i have Windows 2008 Server on which i store DB backups on daily basis. I want to be able to download new files only using wget, curl or windows built-in FTP doesn't matter.

Can you help me with command? I need only new files, ones that exists on local machine (Windows Vista) and server should be skipped.



See the --noclobber option for wget. Also, if you have ncftpget available, I believe it skips existing files by default.


What you are actually looking for is --timestamping. --no-clobber just wont download existing files taking no concideration if the files on the server are newer or not.

--timestamping looks at the file to see if the version remote is newer than local before downloading.


With wget: New = doesn't exist OR more recently modified

Each time run: (probably won't work on existing files - you need the initial download to contain the remote timestamp) wget --timestamping -r ftp://yoursite.com/path/


With cURL you can use the -z option to specify that only files after a certain date should be downloaded

curl -z "Jun 30 2011" http://yoursite.com/file.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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