DriveWorks Solo 17: FsGetFiles [send feedback...]


Returns a list of file names in the selected directory


FsGetFiles([Directory Location],[Search All Subdirectories],[File Types],[Wait Time])


Directory Location is the location to check. If this is not a full path then it shall be treated as being relative to the projects location.

Search All Subdirectories is True to search for directories in the current directory and any of its subdirectories. False to only retrieve directories in the current directory. By default this is False.

File Types is a list of file extensions for the types of files to retrieve from the directory. An empty value will retrieve all file types. By default this will be empty.

Wait Time is the maximum time to wait for the check to complete in seconds. After the specified time, if the directory has not been found #IO! Timed Out will be returned.



FsGetFiles("C:\DriveWorks\Parent Directory",False,"txt|csv",2) This will return the files from the directory C:\DriveWorks\Parent Directory

Subdirectories will not be searched.

Files that exist with the extensions txt and csv will be returned.

If the Parent Directory has not been found after 2 seconds an error will be returned.

Example Outcome

DriveWorks will return the result as an array, which will look like:

Table returned as an Array (headers and rows separated for clarity)

{"Name","Path","Extension","Size (KB)","Date Created";

"BOM 2507","C:\DriveWorks\Parent Directory\BOM 2507.csv",".csv",875.25,"10/31/2017 12:41:37";

"BOM 2507","C:\DriveWorks\Parent Directory\BOM 2507.txt",".txt",467.2,"10/31/2017 12:41:37";

"Cut List 2507","C:\DriveWorks\Parent Directory\Cut List 2507.txt",".txt",780.6,"11/21/2017 09:41:44"}

When viewed in a table, the array will look like:

NamePathExtensionSize (KB)Date Created
BOM 2507C:\DriveWorks\Parent Directory\BOM 2507.csv.csv875.2510/31/2017 12:41:37
BOM 2507C:\DriveWorks\Parent Directory\BOM 2507.txt.txt467.210/31/2017 12:41:37
Cut List 2507C:\DriveWorks\Parent Directory\Cut List 2507.txt.txt780.611/21/2017 09:41:44

Table of Contents