jdberry / tag

A command line tool to manipulate tags on Mac OS X files, and to query for files with those tags.
MIT License
1.47k stars 94 forks source link

error on removing tags #55

Open ghost opened 4 years ago

ghost commented 4 years ago

@jdberry @tessarin

This command is working to reveal every file in the directory that has any tag. tag --match '*' --recursive --tags /Volumes/PlexMedia

When I try to remove all of the tags I found I get an error:

$ tag --remove 'Green' --recursive /Volumes/PlexMedia
tag: The operation couldn’t be completed. (OSStatus error -5000.)

I first thought it could be an ownership issue. The volume didn't have "ignore ownership on this volume" selected. I checked that and ran the command again and received the same error. I then selected "apply to enclosed items" and ran the command again.

Is my command incorrect?

$ tag -r 'Green' -R /Volumes/PlexMedia
tag: The operation couldn’t be completed. (OSStatus error -5000.)

I am thinking I need to pass the found files to xargs but am having trouble with the syntax

$ tag --match '*' --recursive --tags /Volumes/PlexMedia | xargs -0 tag -r {} $ tag --match '*' --recursive --tags /Volumes/PlexMedia | xargs -0 -I {} tag -r -R {}

$ tag --match '*' --recursive --tags /Volumes/PlexMedia | xargs -0 tag -r -R
tag: The item couldn’t be opened because the file name “The Big Short (2015) CD” is invalid.