Jump to content

script for compressing and uploading a file into FTP server


Recommended Posts

Hi i want a script for compressing and uploading a file into FTP server.

Can anyone tell me the script

thanks

mranal

Grab the 7-Zip Command Line Version. This will do the compressing.

To compress the command is:

7za a myfile.zip

You can do more with the above but that will get you started.

To FTP with a script, use the built in Windows FTP command. You need to have the FTP part in its own file (upload.ftp). Using FTP Batch Scripts


open ftpserver
user
password
put myfile.zip
quit
pause

Then to get it all working together; this will run it all (compress_and_ftp.bat).


7za a zipfile.zip

ftp -s:upload.ftp

Make sure both are in the same location and you can't go wrong.

Link to comment
Share on other sites

  • 8 months later...
  • 3 weeks later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy