jb2170 / better-adb-sync

Completely rewritten adbsync with --exclude
Apache License 2.0
363 stars 23 forks source link

[Question] usage of fnmatch (--exclude EXCLUDE, --exclude-from EXCLUDE_FROM) #3

Closed yNEX closed 3 years ago

yNEX commented 3 years ago

Just to clarify and maybe also for other potential users. If i'd like to exclude all files ending with .log. The command would look liek this? -> adbsync.py -exclude-from '*.log' The difference between --exclude-from and --exclude isn't clear for me.

jb2170 commented 3 years ago

You would use --exclude "*.log" to exclude all files ending in .log. The --exclude-from option is for loading a text file that contains fnmatches on separate lines, incase you want to load all your exclude patterns from a saved file instead of passing multiple --exclude options each time.

yNEX commented 2 years ago

You would use --exclude "*.log" to exclude all files ending in .log. The --exclude-from option is for loading a text file that contains fnmatches on separate lines, incase you want to load all your exclude patterns from a saved file instead of passing multiple --exclude options each time.

Oh, that's pretty neat. Well done project! Thanks for answering.