1.

Solve : change remote FTP folder to type ZIP?

Answer»

Hello,

I am using mput to transfer multiple files from my local system to a remote FTP account. The files are dropped inside a folder like so:

Code: [Select]open ftp.abc.com
username
password
[b]cd \IMPORT\Files[/b]
PROMPT
mput *.xml
bye
ftp -n

So NOTICE the "Files" folder. What i want to do once the files have been transferred is to ZIP the folder to something like "ZipFiles.zip"..

Is this possible?

Kind regards,
BillyI was trying this, but doesnt seem to work, i get an invalid command:

Code: [Select]open ftp.abd.com
username
password
cd \IMPORT
prompt
"c:\Program Files\7-zip\7-zip.exe" zip *.xml xml.zip
mput *.zip
bye
ftp -n
Try zipping the files outside the FTP environment. You can put the FTP commands into a separate FILE, put the reference to 7-zip in a batch file, then reference the FTP script with the -s: SWITCH in that same batch file.

Batch file:
Code: [Select]@echo off
cd \IMPORT
"c:\Program Files\7-zip\7-zip.exe" zip *.xml xml.zip
ftp -s:ftpscript.txt

FTPscript.txt
Code: [Select]open ftp.abd.com
username
password
cd \IMPORT
prompt
mput *.zip
bye
ftp -n

Not sure if you need the FTP prompt command, but you can DECIDE that.

Good luck.



Discussion

No Comment Found