Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


chris.hill@adsigroup.co.uk
2019-02-26T12:17:59Z
I need to step through a folder full of files, but each file will be in a sub folder - e.g.

\\folder_to_loop\sub_folder1\file.pdf
\\folder_to_loop\sub_folder2\file.pdf
\\folder_to_loop\sub_folder3\file.pdf

So I have created a List Files task to loop through all of \\folder_to_loop and include the sub folders, and got it to return the full path to file.

How do I then use this output in a PDF Convert task which seems to want a Folder and a file mask? I only want the PDF convert to do a single file at a time within my loop as I then do other actions on it following the conversion and for completeness I want to do a single file at a time so I can react to any issues etc.

Thanks
Sponsor
Forum information
thordw
2019-02-26T12:45:01Z
Hi

Create a foreach loop from you're list then then use {LOOP(CurrentValueX)} with 2 functions

Path.GetfileName
&
Path.GetDirectoryName
(see variables section File & Directory)

  • {PATH(GetDirectoryName|{LOOP(CurrentValueX)})} in the directory
  • {PATH(GetFileName|{LOOP(CurrentValueX)})} in the file mask.

chris.hill@adsigroup.co.uk
2019-02-26T14:04:20Z
Originally Posted by: thordw 

Hi

Create a foreach loop from you're list then then use {LOOP(CurrentValueX)} with 2 functions

Path.GetfileName
&
Path.GetDirectoryName
(see variables section File & Directory)


  • {PATH(GetDirectoryName|{LOOP(CurrentValueX)})} in the directory
  • {PATH(GetFileName|{LOOP(CurrentValueX)})} in the file mask.



Awesome thanks - that's got it
Scroll to Top