How to write a custom xattr tag to files?
Posted: 18 Mar 2023, 04:51
I've been pouring over this for an hour trying to figure it out but I'm not getting anywhere. I've mostly been looking at this topic: viewtopic.php?t=4826 but I can't make any commands that work.
All I want to do is tag my files with a label to identify their origin, mostly torrent trackers but it could be something like YouTube or archive.org.
I plan to write a bash script to add this xattr tag to all of my files as they come in. They can get the name of the tracker from the folder they're in as that's how I have them sorted initially.
A couple of the things I've tried that haven't worked:
This one seems to execute and says done, but then if I open the files in FileBot GUI, go to filters, select the files and go to the attributes tab, there is nothing there:
This one returns 'Bad script source: f.xattr['net.filebot.ut.label'] = 'Label 1'':
I'm sorry for so many questions but I'm having a lot of trouble figuring out this part. It seems that writing xattr attributes is pretty advanced, but I just want to do something simple with it.
Thank you!
All I want to do is tag my files with a label to identify their origin, mostly torrent trackers but it could be something like YouTube or archive.org.
I plan to write a bash script to add this xattr tag to all of my files as they come in. They can get the name of the tracker from the folder they're in as that's how I have them sorted initially.
A couple of the things I've tried that haven't worked:
This one seems to execute and says done, but then if I open the files in FileBot GUI, go to filters, select the files and go to the attributes tab, there is nothing there:
Code: Select all
filebot -r '/storage/Temporary/' -script "g:args.each{ it.xattr[key] = value }" --def key="net.filebot.test" --def value="Hello World"
Code: Select all
filebot -script "f.xattr['net.filebot.ut.label'] = 'Label 1'" -r '/storage/Temporary/The Smurfs'
Thank you!