Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get --exclude to work with --pull #17

Open
calebplum opened this issue Oct 30, 2022 · 2 comments
Open

Can't get --exclude to work with --pull #17

calebplum opened this issue Oct 30, 2022 · 2 comments

Comments

@calebplum
Copy link

calebplum commented Oct 30, 2022

I'm trying to copy the entire contents of /sdcard from a device to a computer while excluding certain large directories (such as the Spotify cache). But I can't seem to get the --exclude flag to work correctly.

I've tried:

adbsync.py -L --exclude "/sdcard/Android/data/com.spotify.music/" --pull . /sdcard/
adbsync.py -L --exclude "/sdcard/Android/data/com.spotify.music/*" --pull . /sdcard/

But both commands result in the excluded directories being copied:

/sdcard/Android/data/com.spotify.music/files/spotifycache/Storage/6f...88e574ac209a58b.file: 1 file pulled. 2.1 MB/s (3601 bytes in 0.002s)
/sdcard/Android/data/com.spotify.music/files/spotifycache/Storage/6f...a205583bf104.file: 1 file pulled. 19.4 MB/s (101635 bytes in 0.005s)
/sdcard/Android/data/com.spotify.music/files/spotifycache/Storage/6f...f36ae173de05.file: 1 file pulled. 25.4 MB/s (164866 bytes in 0.006s)

Am I using the flag incorrectly? It would be great to have some example usage for each of the flags in the README and when you run the script with no arguments.

@fk1000
Copy link

fk1000 commented Feb 7, 2023

Quoting README.md:

Each should be a fnmatch pattern relative to the source.

So you should remove /sdcard/ from your exclude pattern.

See Python documetation for fnmatch. You may use * to match parts of a complete (relative) path, even including / characters.

@drws
Copy link

drws commented Jan 27, 2025

So this was never an issue, merely a support ticket? While @calebplum didn't even bother to reply whether the proposed solution worked, let alone keep some order after themselves by closing the issue.

Close the issue, @calebplum .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants