LibraryEASYProcess Reference Manual 5ProcessesServicesFileSystemWorkshopGetDirectories

GetDirectories Overview

The GetDirectories service finds subdirectories for the specified directory based on certain criteria.

GetDirectories Use Examples
DirectoryNameThe full path of the directory in which to look for subdirectories

SearchPatternThis allows you to filtert the returned subdirectories by their name. For example, inputting ' Test* ' will only return directories that start with ' Test '. The ' * ' symbol is used as a wildcard. If you don't use ' * ', then it searches for the exact match.

SearchOptionThere are two valid values. TopDirectoryOnly - Only immediate subdirectories may be returned. AllDirectories - All subdirectories and their subdirectories (recursively) may be returned.

DirectoryFullNameThe full path of the returned directory
DirectoryNameThe name of the returned directory

GetDirectories Use Example

Basic GetDirectories Use

In this example, we have the directory setup like the following. TestDirectory has two subdirectories "File 111" and "File 222". File 222 has another subdirectory "Sub File1".

We first tried to search the exact match for "File" in all subdirectories by not using " * " symbol. The service returns nothing.

Then we add the " * " after keyword "File". It searches all directories that starts with "File". Hence it returns "File 111" and "File 222".

Now we add " * " before and after keyword "File". It searches all directories that contains keyword "File". Hence "Sub File1" returns as well.

If we set SearchOption to TopDirectoryOnly, it only returns directory under the one you searched for.

Powered by EASYProcess (© 2022 K-Rise Systems, Inc).