List Sub Directories
  • 10 Jan 2023
  • 1 Minute to read
  • Dark
    Light

List Sub Directories

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version7.12.0
LocationFile Mangement

The List Sub Directories step will list all subdirectories found in a directory. The step will output the full path to each directory as an entry to the list. If a subdirectory also contains nested directories, these directories will also be listed.



Properties


Inputs

PropertyDescriptionData Type
Directory NameThe name of the directory including its full path.String

Outputs

PropertyDescriptionData Type
OutputOutputs a list of all files found within the directory and its subdirectoriesList of Strings


Common Errors

Unable to locate Directory. Directory does not exist

By default, Decisions will search for the directory starting from C:\Program FIles\Decisions directory. To ensure the directory can be located, include the full file path to the directory for the Directory Name input.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step List Sub Directories 1[ListSubDirectories] in flow [Testing Flow]: Exception invoking method ListSubDirectories on class FileSteps ---> DecisionsFramework.LoggedException: Exception invoking method ListSubDirectories on class FileSteps ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Decisions\example'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions)
   at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)
   at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.ListSubDirectories(String directoryName) 
   --- End of inner exception stack trace ---
   at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data)
   at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData)
   at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) 
   --- End of inner exception stack trace ---


Was this article helpful?

What's Next