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


Danny van Oijen
2017-05-16T10:30:39Z
Hi all,
When creating a FTP upload job currently there is only an option to delete the source file, is it possible to create a move file?
Sponsor
Forum information
Support
2017-05-16T12:38:35Z
Originally Posted by: Danny van Oijen 

Hi all,
When creating a FTP upload job currently there is only an option to delete the source file, is it possible to create a move file?



Both Upload and move? No - you have to create two steps.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Danny van Oijen
2017-05-16T12:59:00Z
Ok, i understand but problem here is that when the action runs to upload the files and exactly at that moment a file is created it won't be uploaded but it will be moved by the second action am i right?
Danny van Oijen
2017-05-17T07:26:46Z
Maybe i'm running a little bit ahead but this is a feature we really need.
We want to replace some software we currently have, it has several other issues with but it has this option.
ErikC
2017-05-17T07:46:26Z
Hoi Danny,

What excaclty are you planning to do? You want to upload a file and you want to move it. Do you want to move the source?
If so, you do not check the delete source after upload, you create an extra file move task (2nd task)
When you upload a file, you are using a file filter, you can use the same file filter in the file move task and move the file to a different location.

I see you're dutch, so am I 😉 Woohoo

Regards,
Erik

Uses Visualcron since 2006.
Danny van Oijen
2017-05-17T07:54:38Z
ErikC,

The scenario is as this:
A file will be created on a local server somewhere, every 5 min there will be a task that watches this folder. When there is a file it will upload it to a FTP server somewhere on teh internet, when it is uploaded it needs locally be moved to another folder on the local server (eg. handled).
I currently have set it up to not delete the file from source after upload, a second job in this task will than copy/move (deselected keep existing file) to move it to the dir i want.
This works but i am a little scared it will move files while it is not uploaded...

What i mean is, when a file is created and the upload starts, what wil happen when a file is created during a upload?
Will this new file be moved without uploading?
ErikC
2017-05-17T08:44:40Z
Hi Danny,

I understand now 😁.

What you need to do is dismiss the 5 min Time event trigger and use a 'Even trigger - File' on the watched folder.
When you do this, every time a file comes in the folder, the job will run. Your job has a setting to put it in queue mode, so no file is missing. When you use the file trigger, it will ask you to set it up for you.
In the FTP file upload task, your filename should be the value of the file entered in the watch folder. You need to use the results of the file trigger and that's {TRIGGER(Active|LastTrigger|File.Result.Name)}
In the copy file task after the upload, you need to use the same variable value in the 'Include file mask' field.
Also setup the ftp upload task to stop if the upload fails in the flow and on error tab.

In this way the files in the watched folder are uploaded one at the time and moved. If the upload fails, the file is stil locally there. By replacing (move out/move in) the file is reuploaded.

[Dutch]Succes, je kan het![/Dutch]

Regards,
Erik
Uses Visualcron since 2006.
Danny van Oijen
2017-05-17T09:16:27Z
ErikC,

Ok, just to be sure,
- I created a Job named: Transport Upload
- In this Job i created a File event Trigger: Folder Path: \\SERVER\SHAREDFOLDER
- In the same event trigger i created a Task: Upload File(s)
Folder: \\SERVER\SHAREDFOLDER
Include File Mask: {TRIGGER(177bb0fd-1e4a-453b-bd49-5cb71bbf6088|LastTrigger|File.Result.Name)}
{TRIGGER(177bb0fd-1e4a-453b-bd49-5cb71bbf6088|LastTrigger|File.Result.Name)} (this i got by the Variable: VisualCron variables --> Jobs --> Transport Upload --> Triggers --> Last trigger --> File --> Result --> Name) (Am i right))
- Than i created a second task in the same event trigger: Move Uploaded File(s)
Copy Files
Folder: \\SERVER\SHAREDFOLDER
Include File Mask: {TRIGGER(177bb0fd-1e4a-453b-bd49-5cb71bbf6088|LastTrigger|File.Result.Name)}
Copy Settings: \\SERVER\SHAREDFOLDER\HANDLED
Destination file name mask: *
Checked: delete source file after copy
ErikC
2017-05-17T10:59:09Z
Hi Danny,

It's better to use the variable: {TRIGGER(Active|LastTrigger|File.Result.Name)}. The ID 177bb0fd..... is harder to read. In this case you can substitude the ID for Active.
You selected the right variable, thumbs up!

Is it working now?

Regards,
Erik
Uses Visualcron since 2006.
Danny van Oijen
2017-05-17T14:04:18Z
ErikC,

Ok but when i have multiple triggers it will select the file that is in the current Job trigger?
So it won't be confused with other triggers from other jobs?
ErikC
2017-05-18T06:12:45Z
Hi Danny,

The {TRIGGER(Active|LastTrigger|File.Result.Name)} gets the filename of the last file trigger. If you have multiple file triggers it will take the right one. The latest file trigger that triggered the job.

A good way to to make new jobs is to test them in a different environment, in this case you could disable the upload and check if all files will go to the \HANDLED folder.

Regards,
Erik
Uses Visualcron since 2006.
Danny van Oijen
2017-05-18T06:14:43Z
Erik,

Ok i figured so but wanted to be sure, thanks!!
Super bedankt kerel!!!
Danny van Oijen
2017-05-18T10:34:02Z
For this job, is it possible to delay the task?
It seems that when a file is created the first task is starting altough the file has not been fully created.
Therefore it is giving me an error: Exception in Task: No file(s) uploaded
Scroll to Top