Home Search

DriveWorks Solo 22
FsGetDirectories

Send Feedback

FsGetDirectories

Returns a table of directory information for the selected directory and optionally all subdirectories.

Syntax

FsGetDirectories([Directory Location],[Search All Subdirectories],[Wait Time])

Where:

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.

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.

This function will not automatically update. To update the function, one of the arguments must change to re-trigger the function.

Example

Rule

Meaning
FsGetDirectories("C:\DriveWorks\Parent Directory",False,2) This will return the path C:\DriveWorks\Parent Directory\Child Directory 1|C:\DriveWorks\Parent Directory\Child Directory 2

Subdirectories (of the child directories) will not be searched.

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","Date Created";

"Child 1 Directory","C:\DriveWorks\Parent Directory\Child 1 Directory","03/05/2018 12:18:05";

"Child 2 Directory","C:\DriveWorks\Parent Directory\Child 2 Directory","03/05/2018 12:18:19";

"Child 3 Directory","C:\DriveWorks\Parent Directory\Child 3 Directory","03/05/2018 12:18:32"}

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

NamePathDate Created
Child 1 DirectoryC:\DriveWorks\Parent Directory\Child 1 Directory03/05/2018 12:18:05
Child 2 DirectoryC:\DriveWorks\Parent Directory\Child 2 Directory03/05/2018 12:18:19
Child 3 DirectoryC:\DriveWorks\Parent Directory\Child 3 Directory03/05/2018 12:18:32