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.
hi Team

My files are getting downloaded correctly using GETFILE command , but the file name remains .part after succesful download
is there any way we can rename the .part file to orginal file . I have used SETUPLOADMODE(DIRECT) command , but i believe that is useful only in case of uploading command , is there similar command for download too ?

Please suggest the solution

Thanks
Swati
Hello Swati,

The downloaded files are suposed to be renamed just after the download is completed. Do you get any error? Could you post more details?

A workaround is to rename the files manually:

[scriptftp="local_file_renaming.ftp"]# This should not be necessary
# Under normal conditions ScriptFTP will rename the downloaded files automatically
EXEC("rename myfilename.txt.part myfilename.txt")[/ScriptFTP]

You can also use variables and a FOREACH loop if you do not know the name of the files being downloaded but I would need to see your script to show you how it should be done

Another user have just reported a similar issue. May be it is a bug that should be fixed, please send more details
Hi Team,

Please find the script attached for your reference.

Thanks & regards,
Accenture_Support
Attachments
(877Bytes)Downloaded 491 times
Hi,

I have added some lines to your script after the GETFILE call:

[scriptftp="rename_after_download.ftp"]VERBOSE(ON)
OPENHOST("10.105.125.146","usernamegoeshere","***")
SETPASSIVE(DISABLED)
LOCALCHDIR("E:\BAK\ECP\DB")
$result=GETFILE("ECP/DB/SPLIT7.BAK")

# This should not be necessary
# Under normal conditions ScriptFTP will rename the downloaded files automatically
IF($result=="OK")
EXEC("rename SPLIT7.BAK.part SPLIT7.BAK")
END IF

CLOSEHOST[/ScriptFTP]