search for files

Discuss RoboTask here
Post Reply
degoup
Posts: 4
Joined: Mon Aug 20, 2007 7:09 am

search for files

Post by degoup »

Hello,
I test version 2.5.1
I want to create a list, but i need two time the variable "name"
Résult : <option value="releve_consigne/B_041_DIEPPE.pdf">XX</option>
I want : <option value="releve_consigne/B_041_DIEPPE.pdf">B_041_DIEPPE.pdf</option>
Is it possible ?
Thanks.


[Root]

ActionAfterRun=INTEGER|0

Actions=FOLDER

Automat=INTEGER|-1

CatID=INTEGER|0

ContinueOnError=INTEGER|0

ExternalName=STRING|"Task1"

Hide=INTEGER|0

ID=INTEGER|1902005443

Name=STRING|"test"

Priority=INTEGER|3

RunOnClose=INTEGER|0

RunOnStartup=INTEGER|0

ToLog=INTEGER|3

[Actions]

Action1=FOLDER

[Actions\Action1]

ActionID=STRING|"A_FILE_SEARCH"

Enabled=INTEGER|-1

Name=STRING|"Create File List (C:\titi.txt)"

Params=FOLDER

[Actions\Action1\Params]

After=STRING|"0"

aftercount=STRING|"1"

AfterLine=STRING|"1"

AfterLineText=STRING|""">xx</option>"

Before=STRING|"0"

beforecount=STRING|"1"

BeforeLine=STRING|"1"

BeforeLineText=STRING|"<option value=""releve_consigne/"

createmode=STRING|"1"

date1=STRING|"20070820"

date2=STRING|"20070820"

destfile=STRING|"C:\titi.txt"

DuringDays=STRING|"1"

DuringMonths=STRING|"1"

file0=STRING|"\\releve_consigne\B_*.pdf"

filecount=STRING|"2"

OlderDays=STRING|"1"

OlderMonths=STRING|"1"

searchkind=STRING|"0"

subdirs=STRING|"0"

WithoutPath=STRING|"1"
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

search for files

Post by Oleg »

Yes of course you can do this.

But I think that you have to use file loop. Look at the example below. If you have any questions, feel free to ask me.

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|1947094105
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task515"
Hide=INTEGER|0
ID=INTEGER|255203920
Name=STRING|"test with loop"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[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 ""MY_TEXT"" with value """""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"MY_TEXT"

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

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20070821"
date2=STRING|"20070821"
destvar=STRING|"CURRENT_FILE"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"\\releve_consigne\B_*.pdf"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""MY_TEXT"" with value ""{my_text}<option value=""releve_consigne/{current_file}"">{current_file} </option>{Eol}"""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"1"
varname=STRING|"MY_TEXT"
varvalue=STRING|"{my_text}<option value=""releve_consigne/{current_file}"">{current_file} </option>{Eol}"

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

[Actions\Action5]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file c:\titi.txt"
Params=FOLDER

[Actions\Action5\Params]
fileexists=STRING|"0"
filname=STRING|"c:\titi.txt"
line0=STRING|"{my_text}"
linecount=STRING|"1"

Last edited by Oleg on Tue Aug 21, 2007 8:39 am, edited 1 time in total.
degoup
Posts: 4
Joined: Mon Aug 20, 2007 7:09 am

search for files

Post by degoup »

Hello,
It's ok... But i change a command ligne.
Name=STRING|"Set variable ""MY_TEXT"" with value ""{my_text}<option value=""releve_consigne/{current_file}"">{current_file}&a mp;l t;/option>{Eol}"""
I just cut }&l t; and remplace by <
Thanks
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

search for files

Post by Oleg »

degoup wrote:It's ok... But i change a command ligne.
Oh, yes. Message editor of the forum breaks the text sometimes.
Post Reply