Need to find a way to upload files to my server through FTP. But only the ones that have been modified. Is there a simple way of doing that? Command line ftp client or script is preferred. Thanks, Jonas.
相关问题
- softlinks atime and mtime modification
- Get unexpanded argument from bash command line
- Include and Execute EXE in C# Command Line App
- Batch - Set variables in for loop
- Rails gem update not working (version 4.1.1 to 4.2
相关文章
- Compile and build with single command line Java (L
- How to update command line output?
- Getting the list of files over FTP
- How to execute another python script from your scr
- PHP 7 FTP extension is not loaded in Windows 7
- Unit/Integration testing FTP access
- Python file keyword argument?
- Interactively merge files tracked with git and unt
Have you considered using the archive bit on the file?
git-ftp works really nice:
in the application folder:
following only if target is up-to-date by other ftp client (it changes ftpservice.server.com/root/dir/for/ftp/git-ftp.log to current commit)
//editing sources//
and you can see what hapens:
Netbeans has a nice ftp. it supports selective upload, download
Jonas,
How often are the files likely to change?
If they change on a predictable time frame, you could consider using the modified and other date attributes on the file.
The most reliable way would be to make md5 hashes of all the local files you care about and store it in a file. So the file will contain a list of filenames and their md5 hashes. Store that file on your ftp server. When you want to update the files on your ftp server, download the file containing the list, compare that against all your local files, and upload the files that have changed (or are new). That way you don't have to worry about archive bits, modified date, or looking at file sizes, the use of which can never be 100% reliable.
Using file sizes isn't reliable for the obvious reason - a file could change but have the same size. I'm not a fan of using the archive bit or modified date because either of those could be confused if you backup or restore your local directory with another backup program.
I know this is an old thread, but while I was looking for the same solution, I came across this link which may be rather useful: Script FTP