Module: Editor
Version: 2.2.1 +
Description
The formula 'ReadDirectory' returns a list of directory names in a specified directory that match a search pattern.
For the search pattern most often a Regular Expression will be used. For more information about this, see the formula 'ValidatePattern'.
Parameters
Directory:
This is the directory to scan
Pattern:
This is the regular expression the directory names have to match
Example 1
Description
Suppose your directory 'c:\inetpub\wwwroot\' contains 4 folders:
- Directory1
- Directory2
- TestDirectory3
- TestDirectory4
In Futurama, you want a list of all TestDirectories, so all directory names that start with 'Test'. Therefore you should use the search pattern: ^(Test)(1)+$. (The brackets around 'Test' are not obliged.)
Values parameters
Directory:
c:\inetpub\wwwroot\
Result
TestDirectory3
TestDirectory4
Example 2
Description
In case you want all directory names, you should use the search pattern: ^.*$. In the case mentioned above this will result in:
Values parameters
Directory:
c:\inetpub\wwwroot\
Result
Directory1
Directory2
TestDirectory3
TestDirectory4