FileSystem.GetFilesInDirectory
Method | GetFilesInDirectory |
---|---|
Module | FileSystem |
Library | Core |
Action | Returns the filename, size, created time and modified time of each file in a directory. |
Parameters |
NoteOn Windows a remote directory is not supported as a mapped drive, although UNC format does work. Ensure that the exclude paths are relative to the directory parameter. |
Return values | If If If Otherwise if any files are found then the result returned for each will have this form:
|
Example | FileSystem.GetFilesInDirectory(Directory:"c:\\tmp"); FileSystem.GetFilesInDirectory(Directory:"c:\\tmp", Recursive:false); @exclude = SELECT column1 AS Path FROM ( VALUES (".\\tmp1"), (".\\tmp2\\SubFolder") ); FileSystem.GetFilesInDirectory(Directory:"C:\\tmp",Exclude:@exclude); |
Platforms |
|
Notes | The DateCreated concept does not exist on some operating systems and consequently this field will be blank where it does not apply. Where the agent cannot access the directory itself then the instruction will return ExcutionError. ImportantOneDrive can report a file creation time after the last modified time. |