...
- Add a File Collector to the model and confiure it as follows:
- Source Type = Specified Directory
- File Type = File Details Only
- File Location Strategy = All Files in Folder
- Input Directory Expression = Enter the name of the folder relative to the Import File Locaion in System Configuration. Put the folder name in double quotes e.g "Data Files"
- File Pattern Expression = ".*." (This will read all file types)
- Make sure the Enabled and Allow on-Schedued collection checkboxes are checked and then save and close the file colletor
- Hover over the file collector and select Add a New Stream
- Add an attribute to the stream to hold the fie name and enter the expression "in._fileName" without the quotes.
- Run analysis on the stream and view the filenames filenames
Copying multiple PhixFlow Objects
File Collector Configuration
Attribute Expression to Read Filename
Example Folder and Results in PhixFlow
Example 2: Read all files with a given file extention
Step-by-step guide
This example shows how to modify the process to only read the csv files. This can be useful when there are multiple file types in a single folder and you want to have separate streams for each type, or just process them separately.
- Add a File Collector to the model and confiure it as follows:
- Source Type = Specified Directory
- File Type = File Details Only
- File Location Strategy = All Files in Folder
- Input Directory Expression = Enter the name of the folder relative to the Import File Locaion in System Configuration. Put the folder name in double quotes e.g "Data Files"
- File Pattern Expression = ".*." (This will read all file types)
- Make sure the Enabled and Allow on-Schedued collection checkboxes are checked and then save and close the file colletor
- Hover over the file collector and select Add a New Stream
- Add an attribute to the stream to hold the fie name and enter the expression "in._fileName" without the quotes.
- Run analysis on the stream and view the filenames
Copying Multiple PhixFlow Objects
Modified Expression to read just the CSV files
Info |
---|
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...