Dynamic Directory to List Files
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am looking to create a process to check a folder and simply list the files in that particular folder. I know how to do this with the standard directory tool, however the problem is that each time I run the workflow, I want the directory to be dynamic. For example, I will want to point to say C:\user\09. Next month, I will want to list the files in C:\user\10 and so on. I know how to create a dynamic path...I just don't know how to feed that into a directory tool...since it doesn't accept an input. The dynamic input tool would be great, except it seems to only accept filenames, not just the directory itself. Please let me know of any thoughts.
In case this helps with other thoughts... the purpose of my workflow is to grab files from a server and move them based on certain criteria. In the end, I want a list of the files that moved. Of course, I can use the current workflow to simply list the files that met the criteria and were to be moved, but without actually checking the folder itself, I cannot confirm that the action was successful, thus the desire to actually look at the folder to create the list.
Thanks
Solved! Go to Solution.
- Labels:
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You will want to make a macro that feeds in this dynamic path as a control parameter like so:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @djodts
This can be done with an Analytic App. By Adding an action tool to update the filepath, a formula in an Action tool can update the Directory tool to the current month's folder.
Here's a formula that will create the requested string for each month:
"C:\user\"+"\"+tostring(DateTimeFormat(DateTimeToday(),"%m"))
I've included an example of this in the App attached to this post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried this but cannot get it to work. Even running the sample workflow, the action does not update the directory filepath. Am I missing a step?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
The best workaround is to create a separate Macro as Brandon mentioned above.
