Count of files to be transferred

Ryan Joseph thealchemistguild at gmail.com
Thu Apr 29 23:13:59 MDT 2010


I'm making a GUI for rsync and having some problems getting a reliable indication of the files that will be transferred (so I can make a progress bar from the results). I didn't see rysnc offered this so my plan has been to get a list of files that will be transferred and count them as rsync reports them using the -v option thus getting a ratio I could make a progress bar from.

The problem is I don't see there is a way to have rsync tell me which files will be transferred so I can count the list. I tried using the --list-only option to count the files first but I can't get it to report the same number of files as are actually transferred when I don't use the option. For example the same command with --list-only is listing 8000 files and when I remove the command 0 files are transferred (which is correct). Shouldn't the command using --list-only report 0 files also as that's how many will be transferred?

Does anyone know a trick to get this information or some other way to get a reliable progress meter of the files transferred? 

Thanks for any ideas you have.

Regards,
	Josef



More information about the rsync mailing list