How do I get mput (Windows FTP) to not overwrite files?
6,193
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
Author by
Chintan Parikh
Updated on September 18, 2022Comments
-
Chintan Parikh over 1 year
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
-
user5249203 about 12 yearsMaybe 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?
-