ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post here if you experience file transfer problems or unexpected errors.
hello,
Im using a script that is based on the "Writing an OK-File" http://www.scriptftp.com/forum/viewtopic.php?f=6&t=38

I want not only delete the OK file but also move/copy the original txt file.
Code: Select all Change current remote directory to /test CHDIR("/test") # Retrieve the file listing, only txt files GETLIST($mylist,LOCAL_FILES,"*.txt") FOREACH $txtfile IN $mylist # Upload the file $result=PUTFILE($txtfile) # Check if the upload were successful IF($result=="OK") # Create the ok file  $trgfilename=$txtfile.".trg" # Download the touch command for windows from  EXEC("D:\FTP_Upload\scripts\touch.exe ".$trgfilename) # Upload it  $result=PUTFILE($trgfilename) # If the TRG file was succesully uploaded, delete the local copy        # If the TRG file was succesully uploaded, move the original file to archive      IF($result=="OK") EXEC("del /F /Q ".$trgfilename) EXEC('copy ".$txtfile" d:\moved')  END IF END IF END FOREACH CLOSEHOST
But in the output it says:
Code: Select allEXEC("copy ".$txtfile" d:\") The system cannot find the file specified.  
I tried several options but all failed.
The TRG file gets deleted, so that works and the trg and txt file are in the same local folder
Does anybody know the solution to this question?

appreciate the help
Found solution in other topic:
Code: Select allEXEC("move ".$txtfile." d:\moved\".$txtfile)
:)