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


wcushy
2010-12-23T16:40:01Z
Hi

I need to copy a file from one directory to another e.g a PDF when a Word document is created. That bit is easy, but i want to use the file name of the word document as the file name for the copied PDF and do not know how to parse this over to the copy or rename function.

E.G:-
Original File name is Test.PDF.
Word document will be created as order12345_AB_0.doc

I want to copy the Test PDF into a new directory and call it order12345_AB_0.PDF

I will then move the original word doc into an archive folder, allowing the process to run again without re-processing the same order. This will run every second as orders are created every couple of seconds.

Regards

Wcushy
Sponsor
Forum information
Support
2010-12-29T12:59:01Z
I am not sure of the flow and relation of PDF and word document but first you should use a File Trigger and not a Time trigger. The file trigger lets you pick up the name.

So, lets say you use the file trigger on the word doc. Maybe you need to add a Wait Task to make sure that the PDF is complete? Then, use a Rename Task and use original filename from File Trigger to rename PDF document. Then create a Copy files Task to copy the new name to the right folder.

Make sure you use setting "Put Job on queue" on the Job.

The Variables for the picked up file are:

Folder: {TRIGGER(Active,LastTrigger,File.Result.Folder)}
File name only: {TRIGGER(Active,LastTrigger,File.Result.Name)}
Full path: {TRIGGER(Active,LastTrigger,File.Result.FullPath)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top