Excel with list of file names in folder
Comments
-
Yes, I have set up the flow pictured below to do this!
Start with a Create Data step to create FileData and give it an Excel file with column names.
Next we have the List Files in Directory step. The input for this step will be the directory we are getting the file names from. For our example we will use 'C:\Program Files\Decisions\Decisions Server\Logs'. This will return the list of the full file paths for each file in the directory.
Then, we will go ahead and put the file paths that we got from the List Files in Directory step using Set Values in Column. The FileList is the file made in the Create Data step and since we added a row for headers, we will want the row to start at row 1.
We will pass in our ListFilesInDirectory1_Output into the ForEach step so that we can get the last write time for each item.
The Get Last Write Time step will take in each file path (Item) and return the last write time and we will need to create a list for these results using the Add Item to List step. Please note that it is important that both the Original List and the New List have the same exact name!
After the ForEach step is done, we will want another Set Values in Column step to add the Write times to our excel sheet. The inputs for this will be similar to the first one except now we will want to add items to column 2 and use our New List from the Add Item to List step.
Then you are ready to download your file! The form I have set up has a File Download component and I have mapped in the excel sheet.
Documentation:
- Create Data: https://documentation.decisions.com/step-library/docs/create-data
- List Files in Directory: https://documentation.decisions.com/step-library/docs/list-files-and-directories-steps
- For Each: https://documentation.decisions.com/step-library/docs/foreach-step
- Get Last Write Time: https://documentation.decisions.com/step-library/docs/get-last-write-time
- Add Item to List step: https://documentation.decisions.com/step-library/docs/add-item-to-list
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions