jb2170/better-adb-sync

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

Closed this issue · 2 comments

yNEX commented

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.

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

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.