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


JRaf
  •  JRaf
  • No customer Topic Starter
2009-08-27T00:18:29Z
Hello,

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.

Thanks.
Sponsor
Forum information
JRaf
  •  JRaf
  • No customer Topic Starter
2009-08-27T00:28:14Z
Ok,

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

{TRIGGER(Active,LastTrigger,File.Result.Name)}

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
  •  JRaf
  • No customer Topic Starter
2009-08-27T00:40:40Z
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?
ErikC
2009-08-27T07:47:20Z
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!

Regards,
Erik
Uses Visualcron since 2006.
Scroll to Top