Tagging files from command line

Discuss and share scripts and script files...
Post Reply
ojohavafoo
Posts: 3
Joined: 19 Mar 2021 15:40

Tagging files from command line

Post by ojohavafoo »

I'm trying to figure out a way to add tags to XYplorer externally. Here's my idea. I'm scanning and OCR'ing a ton of PDFs. I have software that can match keywords in the content, and then do something. What I'd like that something to be is tags within XYplorer. I played around with using powershell to just edit tags.dat directly, but with loops and multiple tags, the workflow would just be too complex.

Is there a way to call the tag function of XYp externally, and let XYp do all the heavy lifting?

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Tagging files from command line

Post by highend »

Call XY with e.g the /feed switch and the script command to tag the file(s)?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

ojohavafoo
Posts: 3
Joined: 19 Mar 2021 15:40

Re: Tagging files from command line

Post by ojohavafoo »

Yeah. That may work. I'll play around with it.

ojohavafoo
Posts: 3
Joined: 19 Mar 2021 15:40

Re: Tagging files from command line

Post by ojohavafoo »

For anyone who is wondering what the solution to this is, here is what I did:

Code: Select all

"C:\Program Files (x86)\XYplorer\XYplorer.exe" /feed="::tag 'abc', 'C:\path\to\your\file.pdf', 1, 0;"
I used the above in cmd.exe. You'd need to do a little more escaping to make it work in powershell.

Post Reply