Automatic FTP

Discuss RoboTask here
Post Reply
atlekoren
Posts: 3
Joined: Tue Mar 30, 2010 2:04 am
Location: Norway

Automatic FTP

Post by atlekoren »

Hi
Can someone help me with this task:
I want to automatic sync a local folder (with all files in) with a ftp folder. When the file(s) is transfered to the ftp, I want to move the local file(s) to another local folder. It's important that the file(s) is not transfered twice!
How can this be done?
The 3 first step I figured out, but the last one...
1. log on ftp
2. FTP Synchronization (local -> Remote)
3. log off ftp
4. ???
Thanks!
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Automatic FTP

Post by Oleg »

Use "Copy/Move Files" action with "Move" option
atlekoren
Posts: 3
Joined: Tue Mar 30, 2010 2:04 am
Location: Norway

Automatic FTP

Post by atlekoren »

Yes, I have done that. But my problem is, when to move the files.
If I put one big file in the local folder, and the ftp starts, then I put another file in the folder before the ftp has ended, then only the first file will be transfered, but both file will be moved to the other local folder. See?
Is there a function or variable that says "if-file-finish-ftp-then-move" ?
Thanks.
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Automatic FTP

Post by Oleg »

In this case you have to process file-by-file in the loop. Like this:

FTP Logon
File loop
   FTP Upload File
   Move File to another folder
End loop

FTP Synchronization is an integrated action and you can do nothing until the action will be done.

File loop catches only files which exists at this moment and ignores files which appeared in the folder later.
atlekoren
Posts: 3
Joined: Tue Mar 30, 2010 2:04 am
Location: Norway

Automatic FTP

Post by atlekoren »

Ok, I will try this way. Thanks for helping
But is it possible to use the "FTP Upload File" to select all files in one folder? It seems to me that I only can select one file, or am I wrong? Can I put in eg: C:\video\toftp\*.* Will that work?
Atle
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Automatic FTP

Post by Oleg »

You should specify the mask of files in the file loop. Within the loop you should process files one-by-one.

You can specify only one file (or variable with the file name) in "FTP Upload" action
Post Reply