How can I upload a many files?

Discuss RoboTask here
Post Reply
sara00
Posts: 3
Joined: Sat Nov 13, 2021 2:24 am

How can I upload a many files?

Post by sara00 »

I have, for example, a number of text files 1.txt , 2 txt , 3.txt 4.txt 5.txt

I want the program to choose them when uploading to the site in the order file by file ..

I also want to save their links all in a text file
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: How can I upload a many files?

Post by Oleg »

You can upload files by using FTP or sFTP protocols
algorithm will be similar to my example (see below)
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1163085779
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task61"
Hide=INTEGER|0
ID=INTEGER|-1442708484
LogOnAsUser=INTEGER|1
Name=STRING|"Upload files"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

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

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FileList"" with value ""c:\incoming\1.txt{EOL}c:\incoming\2 txt{EOL}c:\incoming\3.txt{EOL}c:\incoming\4.txt{EOL}c:\incoming\5.txt"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"FileList"
varvalue=STRING|"c:\incoming\1.txt{EOL}c:\incoming\2 txt{EOL}c:\incoming\3.txt{EOL}c:\incoming\4.txt{EOL}c:\incoming\5.txt"

[Actions\Action2]
ActionID=STRING|"A_SSLFTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"SSL FTP Log On"
Params=FOLDER

[Actions\Action2\Params]
anonymous=STRING|"1"
host=STRING|"localhost"
passive=STRING|"1"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
proxypassword=STRING|"2540124941259682545026731"
proxytype=STRING|"3"
tlsmode=STRING|"0"
useproxy=STRING|"0"
username=STRING|"anonymous"
usessl2=STRING|"0"
usessl3=STRING|"0"
usestls=STRING|"1"
usestls11=STRING|"1"
usestls12=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER

[Actions\Action3\Params]
destvar=STRING|"FILETOUPLOAD"
line0=STRING|"{FileList}"
linecount=STRING|"1"
sourcetext=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_SSLFTP_UPLOAD"
Enabled=INTEGER|-1
Name=STRING|"SSL FTP Upload"
Params=FOLDER

[Actions\Action4\Params]
file=STRING|"{FileToUpload}"
folder=STRING|"/ftpfolder"
ifexists=STRING|"0"

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

Oleg Yershov
Post Reply