Load All Files
- 19 Jan 2023
- 2 Minutes to read
- Print
- DarkLight
Load All Files
- Updated on 19 Jan 2023
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 7.12.0 |
Location | File Management |
The Load All Files step uses the path to a directory and will output a list of all files found in this directory and any nested directories. The step will not indicate the location the file was pulled from. If the full path to the directory is not entered, the step will begin searching from the C:\Program Files\Decisions\Decisions Server for the directory.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Directory | The full path to the directory. | String |
Outputs
Property | Description | Data Type |
---|---|---|
Output | The contents of the files loaded as a FileData type. Any file from the directory or subdirectory will be included in the output. | List of FileData |
Example Inputs and Outputs
Directory | Output |
---|---|
C:\Examples | List of all files found in C:\Examples |
C:\examples | List of all files found in C:\Examples |
Null | Exception Message |
Empty String | Exception Message |
Examples | List of all files found in C:\Program Files\Decisions\Decisions Server\Examples |
Common Errors
Path is empty
If the path specified for the Directory input is null or empty, the step will throw the following error. Ensure that the Directory input contains a valid string and is not null.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Load All Files[LoadAllFiles] in flow [Testing]: Exception invoking method LoadAllFiles on class FileSteps ---> DecisionsFramework.LoggedException: Exception invoking method LoadAllFiles on class FileSteps ---> System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.ListFilesInDirectoryByExtension(String directoryName, String ext)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.LoadAllFilesWithExtension(String directory, String extension)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.LoadAllFiles(String directory)
--- 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 ---
Could not find part of a path
If the Directory input is misspelled or incorrect, the following error will be thrown. Ensure that the input is correct.
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Load All Files[LoadAllFiles] in flow [Testing]: Exception invoking method LoadAllFiles on class FileSteps ---> DecisionsFramework.LoggedException: Exception invoking method LoadAllFiles on class FileSteps ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Decisions\Decisions Server\example'.
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator`1.Init()
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.ListFilesInDirectoryByExtension(String directoryName, String ext)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.LoadAllFilesWithExtension(String directory, String extension)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.LoadAllFiles(String directory)
--- 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 ---
Related Information
Example Labs:
Forum Posts:
Was this article helpful?