Page 1 of 1

File Loop

Posted: Thu Feb 07, 2008 11:37 am
by HRaj
I am new o Robotask.
Here is what I am trying to do. I am doing a FTP of all the files in a directory. after every file transfer I will check the file size in the local directory with the file size in the remote directory. If the file size is not equal I will FTP the file again. So, I want a loop around the routine and it should break out of the loop if and only if the file size is equal.
Here is what I have written. Let me know if this will work or if there is a better way to do this.
File Loop ( search for files - C:\abcd.xml, assign current filename to variable - abcd.xml)
if {FileSize(c:\abcd.dat)} <> {FileSize({{REMOTEFILE}})} then 
   FTP Upload
else
   break
end if
End Loop

File Loop

Posted: Fri Feb 08, 2008 12:00 am
by Oleg
See my post here