I am using the Run Program / Open Document task. The parameter box contains the UNC path to the file. There are additional tasks in my sequence.
But what I need to do, is process all of the tasks in the sequence and after the task is finished start the task sequence again. For the next iteration of the entire task sequence that only thing I need to change is the information in the parameter box to a new UNC path. I have a CSV file that has 800 lines and each line contains a UNC path/file. So I need my main task series to loop through the CSV file changing the parameter box information---but each iteration must execute all the tasks in my task sequence.
How can I "read" the CSV file and substitute the next line in the CSV file into the parameter box, run the series of tasks and then loop back to start the process again until all lines in the CSV file have been processed. I am guessing that this is too difficult to do.
Thanks for all advice. JimC
Read CSV file UNC path to Parament Box in Run Program
Re: Read CSV file UNC path to Parament Box in Run Program
Generally CSV file is a text file. So you can use Text loop to read and process this file sequentially line-by-line.
If you give me several lines from this CSV file I can make a simple example for you.
The algorithm of extracting necessary file name depends on format of each line of CSV
If you give me several lines from this CSV file I can make a simple example for you.
The algorithm of extracting necessary file name depends on format of each line of CSV
Oleg Yershov
Re: Read CSV file UNC path to Parament Box in Run Program
Oleg,
Thanks for the reply; I should have the final version of csv shortly as there have changes made since my original post. I hope to be able to re-post with the CSV line examples in a couple of days. Thank you.
JimC
Thanks for the reply; I should have the final version of csv shortly as there have changes made since my original post. I hope to be able to re-post with the CSV line examples in a couple of days. Thank you.
JimC
Re: Read CSV file UNC path to Parament Box in Run Program
Oleg,
Below is a sample of 3 of the 2,000+ lines in the CSV file. Adobe Acrobat version 10 is installed on my PC. I need to open each PDF using the UNC path, re-save it to the same location, close the PDF and then "move" to the next line to start the sequence again--only stopping when the task reaches the end of the file. Thank you very much for helping me.....it is greatly appreciated. JimC
\\svr-tm\documents\docs\Clients\00008.04\0003\00520273.PDF
\\svr-tm\documents\docs\Clients\00014.00\0628\00519791.PDF
\\svr-tm\documents\docs\Clients\00014.00\0628\00519794.PDF
Below is a sample of 3 of the 2,000+ lines in the CSV file. Adobe Acrobat version 10 is installed on my PC. I need to open each PDF using the UNC path, re-save it to the same location, close the PDF and then "move" to the next line to start the sequence again--only stopping when the task reaches the end of the file. Thank you very much for helping me.....it is greatly appreciated. JimC
\\svr-tm\documents\docs\Clients\00008.04\0003\00520273.PDF
\\svr-tm\documents\docs\Clients\00014.00\0628\00519791.PDF
\\svr-tm\documents\docs\Clients\00014.00\0628\00519794.PDF
Re: Read CSV file UNC path to Parament Box in Run Program
I hop[e I understood you correctly.
Below are two tasks.
Task1 reads CSV file and starts Task2 with parameter
Task2 runs some command-line utility with parameter
Task1:
Task2:
Save the text of the tasks to a file and use menu Task->Import to import the tasks into RoboTask.
Below are two tasks.
Task1 reads CSV file and starts Task2 with parameter
Task2 runs some command-line utility with parameter
Task1:
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task53"
Hide=INTEGER|0
ID=INTEGER|1221287349
LogOnAsUser=INTEGER|1
Name=STRING|"task1"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action1\Params]
destvar=STRING|"LINE"
file=STRING|"C:\temp\test.csv"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_TASKS_START"
Enabled=INTEGER|-1
Name=STRING|"Start Task ""task2"""
Params=FOLDER
[Actions\Action2\Params]
parameter0000=STRING|"filename={line}"
parametercount=STRING|"1"
required=STRING|"0"
taskid=STRING|"-436556658"
wait=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task54"
Hide=INTEGER|0
ID=INTEGER|-436556658
LogOnAsUser=INTEGER|1
Name=STRING|"task2"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action1\Params]
message=STRING|"Try to start the command line:"
type=STRING|"3"
[Actions\Action2]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action2\Params]
message=STRING|"c:\programs\MyUtility.exe ""{filename}"""
type=STRING|"3"
[Actions\Action3]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""MyUtility.exe ""{filename}"""""
Params=FOLDER
[Actions\Action3\Params]
ifnonzero=STRING|"0"
params=STRING|"""{filename}"""
program=STRING|"c:\programs\MyUtility.exe"
runas=STRING|"0"
wait=STRING|"2"
Oleg Yershov