Problems copy/Move files
Problems copy/Move files
Hello, i'm a reseller of robotask from Spain. We have a problem with one of our coustomers.They have a rip software that export PDF files to another folder. The rip first create the end file with 0kb and this file is growing. The final file can be any size from 20 Mb to 1,2,3...Gb and the computer can take a long and variable time to create the file.They have a Cyclic task that every 100 seconds move this file to another computer way network that make a conversion of the PDF file and the problem is that the robotask try to move the incomplete file every 100 seconds and move bad files to the another computer making this crash.How can we make that robotask detect that the file is complete and move it at that time?Thanks
Problems copy/Move files
Look at the "Wait for file" action.
This action waits while the file is opened by another application.
see more here
The task will be paused until file be completely free.
Put this action before file copying the file, like this:
Wait for file //some timeout
Copy file
Also look at the variable {IsFileFree(<SomeFileName>)}
You can use it in If..Then action
This action waits while the file is opened by another application.
see more here
The task will be paused until file be completely free.
Put this action before file copying the file, like this:
Wait for file //some timeout
Copy file
Also look at the variable {IsFileFree(<SomeFileName>)}
You can use it in If..Then action
Problems copy/Move files
Hi Oleg, i believe that in the action wait for life you must put the exact name of a file, but this is variable. How can i do it,please?
Problems copy/Move files
You can copy files in the loop. See the example below.
You don't need to know exact file name. You can use variables
File loop will find corresponding files and process all files one-by-one.
You don't need to know exact file name. You can use variables
File loop will find corresponding files and process all files one-by-one.
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|2099193306
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task449"
Hide=INTEGER|0
ID=INTEGER|128235586
LocalVariables=STRING|"cfile"
LogOnAsUser=INTEGER|1
Name=STRING|"copy files in the loop"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20121018"
date2=STRING|"20121018"
destvar=STRING|"CFILE"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\incoming\*.pdf"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_FILE_WAIT"
Enabled=INTEGER|-1
Name=STRING|"Waiting {cfile} file for 60 sec"
Params=FOLDER
[Actions\Action2\Params]
filename=STRING|"{cfile}"
timeout=STRING|"60"
[Actions\Action3]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER
[Actions\Action3\Params]
destdir=STRING|"c:\dest"
f_count=STRING|"1"
file0=STRING|"{cfile}"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"0"
subdir=STRING|"0"
system=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Problems copy/Move files
Thanks Oleg, could you send me in .tsk file please or said me how to do it. I haven't many experience with robotask, only resell it.
Problems copy/Move files
Save the text of task into TSK file (or any text file)
and use menu Task->Import in order to import into RoboTask
Text of task is in the CODE field of my previous message.
and use menu Task->Import in order to import into RoboTask
Text of task is in the CODE field of my previous message.
Problems copy/Move files
Thanks you very much!!