Page 1 of 1

FTP Download

Posted: Wed Jun 15, 2005 7:48 am
by Paul
Hi
I need to download all files from a specific folder on an FTP site. What command do i use to automatically select all files, I have tried the normal *.* but it does not work.
Thanks in advance
 
 

FTP Download

Posted: Wed Jun 15, 2005 7:59 am
by Oleg
You must use FTP File loop action
For example see task below.
Save text of task to file and use menu Task|Import to import into RoboTask

Code: Select all

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|565106205
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task271"
Hide=INTEGER|0
ID=INTEGER|1210111037
Name=STRING|"FTP File Loop..."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|1

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"FTP Log On"
Params=FOLDER

[Actions\Action1\Params]
anonymous=STRING|"1"
host=STRING|"localhost"
passive=STRING|"1"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
username=STRING|"anonymous"

[Actions\Action2]
ActionID=STRING|"A_FTP_FILELOOP"
Enabled=INTEGER|-1
Name=STRING|"FTP File Loop"
Params=FOLDER

[Actions\Action2\Params]
filenameonly=STRING|"0"
folder=STRING|"*.*"
sizesave=STRING|"0"
subfolders=STRING|"0"
timesave=STRING|"0"
varname=STRING|"FTP_FILE"

[Actions\Action3]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER

[Actions\Action3\Params]
message=STRING|"{ftp_file}"
type=STRING|"2"

[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

FTP Download

Posted: Thu Jun 16, 2005 12:14 am
by Paul
Hi
Thanks for your response. I dont undrstand the file loop and cant seem to get the download to work. I need to carry out the following task.
1. FTP Log On
2. FTP Change Folder
3. FTP Download all files in the folder to a specified folder on my sever
4. FTP log Off
I can get it all to work except the actual download of all files. Where and how does the file loop go within the actions.
Look forward to your reply
Many Thanks Paul
 

FTP Download

Posted: Thu Jun 16, 2005 12:50 am
by Oleg
Ok, see task below.
Loop works so: it repeat actions inside the loop for each file. Name of current file is stored in FTP_FILE variable (see settings of FTP loop action).

Code: Select all

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|565106205
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task272"
Hide=INTEGER|0
ID=INTEGER|4116511
Name=STRING|"FTP File Loop and download"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|1

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"FTP Log On"
Params=FOLDER

[Actions\Action1\Params]
anonymous=STRING|"1"
host=STRING|"localhost"
passive=STRING|"1"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
username=STRING|"anonymous"

[Actions\Action2]
ActionID=STRING|"A_FTP_CHANGEFOLDER"
Enabled=INTEGER|-1
Name=STRING|"FTP Change Folder"
Params=FOLDER

[Actions\Action2\Params]
folder=STRING|"/incoming"

[Actions\Action3]
ActionID=STRING|"A_FTP_FILELOOP"
Enabled=INTEGER|-1
Name=STRING|"FTP File Loop"
Params=FOLDER

[Actions\Action3\Params]
filenameonly=STRING|"0"
folder=STRING|"*.*"
sizesave=STRING|"0"
subfolders=STRING|"0"
timesave=STRING|"0"
varname=STRING|"FTP_FILE"

[Actions\Action4]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER

[Actions\Action4\Params]
message=STRING|"downloading file {ftp_file}"
type=STRING|"2"

[Actions\Action5]
ActionID=STRING|"A_FTP_DOWNLOAD"
Enabled=INTEGER|-1
Name=STRING|"FTP Download"
Params=FOLDER

[Actions\Action5\Params]
file=STRING|"{ftp_file}"
folder=STRING|"C:\Temp"

[Actions\Action6]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action7]
ActionID=STRING|"A_FTP_LOGOFF"
Enabled=INTEGER|-1
Name=STRING|"FTP Log Off"

FTP Download

Posted: Thu Jun 16, 2005 1:50 am
by Paul
Hi
Many thanks for your assistance its working fine.
Paul

Re: FTP Download

Posted: Mon Mar 04, 2024 4:34 pm
by davidmclark
Hi. Not sure how to add Tasks to Roboform. But a suggestion. For the FTP tasks would this not be much simpler for a user for you to simply add Recursive downloads similar to how you do it in SFTP or simply add wildcards in the file names?