Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a directory on my local system, lets say C:\dir. I'm writing a batch script to upload the contents of that directory to my server. Here's the script:

@ftp -i -s:"%~f0"&GOTO:EOF
lcd C:\dir
cd  somedir/dir
mput "*.*"

Is it possible to somehow change mput to not overwrite files? Currently, it seems to overwrite files with the same name. I'm planning on getting this to run automatically, once a day, hence why I'd rather it didn't overwrite the files.

Cheers, Chintan

share|improve this question
Maybe you should be looking at a backup tool like rsync or unison? Or perhaps you need a web-site updating tool that updates files if the local copy has a more recent modification date? – RedGrittyBrick May 15 '12 at 16:05
up vote 1 down vote accepted

WinSCP can be used to schedule updates using FTP.

Normally you want files to be overwritten if, and only if, the local copy has a more recent modification time. See WinSCP's synchronize command

share|improve this answer
Oh wow, awesome, thanks! – Chintan Parikh May 15 '12 at 23:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .