Get downloaded filename and store in a variable - VisualCron - Forum

Community forum

  •  felix
  • No customer Topic Starter
So I know how to set a variable using the set variable task, but I'm not sure how to get the filename of a downloaded file from the download ftp task, if that task uses a mask (like *.csv) to download the file/files.

I want to use the variable as a parameter for a script (I already know how to do this)
Forum information
Hi Felix,

If you look at the task specific variables you can see a result section in the ftp download. There is one named:


This contains the filesnames downloaded.

Uses Visualcron since 2006.
  •  felix
  • No customer Topic Starter
Thanks, and how would I figure out what the type of a variable is and how it is formatted? For instance, {TASK(#idoftask#,Result.DownloadedFilesNames)} is filenames separated by some kind of line break character (figured this out by having a task output the value to a text file) but if there's only one file downloaded it is just that one file name. Is there an easier way to just see this? Also then if there are multiple files (which I might deal with later) is there a way to iterate through those file names in a script? or have visualcron output the file names one at a time for the script to process? (since the script I'm using only takes one file name) (the script im using is an exe file and im not sure what language it was actually written in or if it can be edited)
You can either use PrevTask as Id if it is the previous Task you want to reference to. Or you can find the exact Id by opening the Variables window and go to Jobs tree item and scroll down to the actual Job and Task and expand it further.
Please like  VisualCron on facebook!
Scroll to Top