Hi.
Is it possible to manage the renamefile command to override an existing file?
Sometime i have a Return Code issuing that the file exist (i.e)
I need to override it.
Is it possible?
Best regards.
Is it possible to manage the renamefile command to override an existing file?
Sometime i have a Return Code issuing that the file exist (i.e)
***** RENAMEFILE Error #17553: Cannot rename remote file FATT105201207201050388.dasped to FATT105201207201050388.pdf.
***** The server said: file exists
Error rename remote
An Error was found during remote rename files.
I need to override it.
Is it possible?
Best regards.
FTP Script
Hi.
Thanks for your support.
In my script I use the following statements:
[ScriptFTP]$result_rename_remote=renamefile("*.dasped","*.pdf")
IF($result_rename_remote!="OK")
PRINT("Error rename remote")
GOTO :failed_remote_rename
END IF[/ScriptFTP]
Is it possible to insert your suggestion (i can't write the name of the file because they can vary) ?
Note that not all pdf must be deleted in advance because may be that there are some other PDFs not ftped.
Best Regards
Thanks for your support.
In my script I use the following statements:
[ScriptFTP]$result_rename_remote=renamefile("*.dasped","*.pdf")
IF($result_rename_remote!="OK")
PRINT("Error rename remote")
GOTO :failed_remote_rename
END IF[/ScriptFTP]
Is it possible to insert your suggestion (i can't write the name of the file because they can vary) ?
Note that not all pdf must be deleted in advance because may be that there are some other PDFs not ftped.
Best Regards
Hi,
Is it possible to insert your suggestion (i can't write the name of the file because they can vary) ?With the GETLIST command is possible. Try the following:
FTP Script
- # Get the list of the remote .dasped files
- # For each .dasped file ...
- # the PDF file name will be
- # To prevent RENAMEFILE failing delete the PDF file first
- # Rename the file
liked Script FTP? Try our other product Email Parser