i am downloading files from a mainframe to a windows workstation and need the destination file to have an extention of .txt
Take a look at the command GETFILE2. It is used to download files eith a different name (or extension):
http://www.scriptftp.com/reference.php?go=topic630
And an example:
[scriptftp="download_different_name.ftp"]OPENHOST("127.0.0.1","carl","123456")
# Download 1234.txt and save in under the name qwerty.txt
GETFILE2("1234.txt","qwerty.txt")
# Download test.txt which is under the remote subdirectory
# myremotesubdir and save in under the name qwerty.txt
GETFILE2("/myremotesubdir/test.txt","qwerty.txt")
CLOSEHOST[/ScriptFTP]
http://www.scriptftp.com/reference.php?go=topic630
And an example:
[scriptftp="download_different_name.ftp"]OPENHOST("127.0.0.1","carl","123456")
# Download 1234.txt and save in under the name qwerty.txt
GETFILE2("1234.txt","qwerty.txt")
# Download test.txt which is under the remote subdirectory
# myremotesubdir and save in under the name qwerty.txt
GETFILE2("/myremotesubdir/test.txt","qwerty.txt")
CLOSEHOST[/ScriptFTP]
liked Script FTP? Try our other product Email Parser