File Loop: multiple paths in variable?

Discuss RoboTask here
Post Reply
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

File Loop: multiple paths in variable?

Post by userXXX »

Hello Oleg,

I'm trying to fill a variable with several paths to use as the search criteria in a file loop.
I created an example to show my problem (sorry, but upload didn't work):

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|740980707
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task10"
Hide=INTEGER|0
ID=INTEGER|848860033
LocalVariables=STRING|"L_FILE=,L_PATH_ALL=,L_PATH_COLLECT1=C:\RoboTask\collect1,L_PATH_COLLECT2=C:\RoboTask\collect2,L_PATH1=C:\RoboTask\test1,L_PATH2=C:\RoboTask\test2"
LogOnAsUser=INTEGER|1
Name=STRING|"Test ""File Loop"""
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//This works fine"
Params=FOLDER

[Actions\Action1\Params]
comment=STRING|"This works fine"

[Actions\Action10]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER

[Actions\Action10\Params]
destdir=STRING|"{L_PATH_COLLECT2}"
f_count=STRING|"1"
file0=STRING|"{L_FILE}"
hidden=STRING|"0"
ifexists=STRING|"0"
move=STRING|"0"
subdir=STRING|"0"
system=STRING|"0"

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

[Actions\Action12]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Check {L_PATH_COLLECT2} !"""
Params=FOLDER

[Actions\Action12\Params]
icon=STRING|"1"
msg0=STRING|"Check {L_PATH_COLLECT2} !"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

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

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20150512"
date2=STRING|"20150512"
destvar=STRING|"L_FILE"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"{L_PATH1}\*.txt"
file1=STRING|"{L_PATH2}\*.txt"
filecount=STRING|"2"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER

[Actions\Action3\Params]
destdir=STRING|"{L_PATH_COLLECT1}"
f_count=STRING|"1"
file0=STRING|"{L_FILE}"
hidden=STRING|"0"
ifexists=STRING|"0"
move=STRING|"0"
subdir=STRING|"0"
system=STRING|"0"

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

[Actions\Action5]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Check {L_PATH_COLLECT1} !"""
Params=FOLDER

[Actions\Action5\Params]
icon=STRING|"1"
msg0=STRING|"Check {L_PATH_COLLECT1} !"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action6]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//This doesn't work"
Params=FOLDER

[Actions\Action6\Params]
comment=STRING|"This doesn't work"

[Actions\Action7]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""L_PATH_ALL"" with value ""{L_PATH1}\*.txt{EOL}{L_PATH2}\*.txt"""
Params=FOLDER

[Actions\Action7\Params]
expand=STRING|"1"
varname=STRING|"L_PATH_ALL"
varvalue=STRING|"{L_PATH1}\*.txt{EOL}{L_PATH2}\*.txt"

[Actions\Action8]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|0
Name=STRING|"Show ""{L_PATH_ALL}"""
Params=FOLDER

[Actions\Action8\Params]
icon=STRING|"1"
msg0=STRING|"{L_PATH_ALL}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action9]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER

[Actions\Action9\Params]
createmode=STRING|"1"
date1=STRING|"20150512"
date2=STRING|"20150512"
destvar=STRING|"L_FILE"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"{L_PATH_ALL}"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

Thank you!
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: File Loop: multiple paths in variable?

Post by Oleg »

Hm-m... It seems this is malfunction.
We'll correct this. Thank you for your report
Oleg Yershov
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: File Loop: multiple paths in variable?

Post by Oleg »

You can download fresh copy: http://www.robotask.com/downloads/RobotaskSetup.exe
We have fixed the problem, you can test it.
Oleg Yershov
Post Reply