Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
open ftp.chintanparikh.x10.mx
[username]
[password]
lcd C:\dir
cd  somedir/dir
binary
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.