Looping through File in a folder - VisualCron - Forum

Community forum

Kevin.Rainier
2012-10-11T17:43:52Z
Hello,

Please let me know if someone knows a method to loop through all text files in a specified folder in order to execute a process against that file.

We have a scenario where we have several files in a folder that we need to execute an import for.

- Thanks, Kevin
bbusse
2012-10-11T18:33:42Z
Originally Posted by: Kevin.Rainier 

Hello,

Please let me know if someone knows a method to loop through all text files in a specified folder in order to execute a process against that file.

We have a scenario where we have several files in a folder that we need to execute an import for.

- Thanks, Kevin




There are probably a couple ways to do it. The first of which would be using the "File - List Files" Task to simply gather a list of the files into its output.

Then, use a "Loop" that woud do a foreach from the output of the previous task (which would be the full path to each file). The Loop could be an execute task that uses the variable as part of the command line or arguments to an 'execute' task

I'm still learning this stuff, but the Loop video is helpful:

All Tutorials via Video: http://www.visualcron.com/Tutorials.aspx 
Video I'm referencing: Loops - For Each loop example

Brian
Kevin.Rainier
2012-10-11T18:42:24Z
Interesting. Thanks for the reply. Do you know which version of VisualCron has that loop functionality? We are currently running 5.3.2 in production.
bbusse
2012-10-11T23:39:13Z
Started with version 6.0.0 according to the change log.

http://www.visualcron.com/Changelog.aspx 

Brian


Scroll to Top