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.

  •  JRaf
  • No customer Topic Starter

I am new to Visual Cron but haven't been able to find what i am looking for in the Help.

What I am doing is using a file trigger to kick off a job when a file is created in a directory. Then the job's first task is to move the file from one dir to another.

All easy so far

but then i need to log the file name into a SQL Database table. I am using a File Mask for the trigger and copy file job cause the name comes in with a date appending (example filename_MMDDYYYY.txt) so i can't specify the exact file name for the job, and have tried a few different ways to get the file name that is being copied and put it into a variable, but i just can't seem to get it right.

can someone help and let me know how to use a file mask on file copy and have the file name(s) that is found by the mask copied to a varible so i can insert it into a SQL table.

Forum information
  •  JRaf
  • No customer Topic Starter

I actually found the variable i was looking for, it was :


incase anyone is looking.

however now i have another issue.

if more than one file shows up for a day (say they forgot to create a file one day so they create two the next) i can only the last file name from this variable, is there any way to get the jobs to only run for 1 file at a time and then repeat if more?

thanks again.
  •  JRaf
  • No customer Topic Starter
Man i am on a role at solving my own issues...

i figured out that i could create a custom variable that would store the top file name in the mask which would then be used to move the file and write to the database deleting the source file after move so the next run of the job it picks up the next file.

now i just need to know how to have the job keep checking if a file exists in a directory and keep executing until it doesn't.

can anyone help with that?
Hi JRaf, welcome 😊

You can create a job running every x minutes/seconds with a trigger.
On the 1st task you setup a condition to check if the file is there.
If so continue to the next task, if not stop the job.

Good luck in your new world named: VisualCron!

Uses Visualcron since 2006.
Scroll to Top