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

Batch tag #50

Open Clem777 opened 4 years ago

Clem777 commented 4 years ago

Hi, First of all thank you for this very useful tool. I'm a newbie so sorry if my question is dumb. I'd need to batch tag a large amount of files (+200000) The actual list of files works great but is not ok for this purpose, too many entries. I have the paths in a text file, is there's a way Tag could read this text file's files adresses and tag the files? Thanks in advance

jhein05 commented 4 years ago

Hi, I hope it is OK if i comment here: You probably need to write a little shell script, that goes through your files and/or directories and tags those files. If you're, like me, not good at that, there is a great tool called Hazel (https://www.noodlesoft.com/)* that would be perfect for this type of job (and many other automation tasks). Give it a try and you'll probably wonder how you could live without it :)

*(costs a little bit / not affiliated with it in any way)

jdberry commented 4 years ago

@Clem777 The intent in the case of a large number of files such as you describe is that you should use tag in conjunction with the xargs tool. You would feed your text file of paths to xargs, which would read the lines and invoke tag multiple times as needed.

TashaSunny commented 4 years ago

Highly recommended Hazel!

On Tue, Dec 3, 2019 at 3:53 AM jhein notifications@github.com wrote:

Hi, I hope it is OK if i comment here: You probably need to write a little shell script, that goes through your files and/or directories and tags those files. If you're, like me, not good at that, there is a great tool called Hazel (https://www.noodlesoft.com/)* that would be perfect for this type of job (and many other automation tasks). Give it a try and you'll probably wonder how you could live without it :)

*(costs a little bit / not affiliated with it in any way)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jdberry/tag/issues/50?email_source=notifications&email_token=ABUS4PX5PENPLODRTI25ONDQWYNCJA5CNFSM4JTITH2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFYSVJY#issuecomment-561064615, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUS4PWC4QUP6MBMHR3DZC3QWYNCJANCNFSM4JTITH2A .

-- Sincerely, Tasha Stanton

Clem777 commented 4 years ago

Hi, I hope it is OK if i comment here: You probably need to write a little shell script, that goes through your files and/or directories and tags those files. If you're, like me, not good at that, there is a great tool called Hazel (https://www.noodlesoft.com/)* that would be perfect for this type of job (and many other automation tasks). Give it a try and you'll probably wonder how you could live without it :)

*(costs a little bit / not affiliated with it in any way)

Thanks jhein05 for the answer. I know Hazel, very practical, I use it to sort folders. To me Hazel would process the files of a specific folder according to filters I set or am I missing something? I need to process only the files from a text list, generated by a database software. It will help me find the non indexed files.

Clem777 commented 4 years ago

@Clem777 The intent in the case of a large number of files such as you describe is that you should use tag in conjunction with the xargs tool. You would feed your text file of paths to xargs, which would read the lines and invoke tag multiple times as needed.

Thank you jdberry, I will definitely look at xargs, it seems to do what I want. I won't have time to test until next week-end but I will let you know. Thanks for the great tool :) Regards