Batch renaming tags

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Batch renaming tags

Post by cadu »

Hi,

I had a tag named "TAGX" which I changed to "TAGZ" through the tag list.

Although the name changed in tag list, the files already tagged are still named the old tag "TAGX".

How could I batch renaming all "TAGX" files to "TAGZ"?

If renaming isn't available, a kind of find/replace tag names would work, since "TAGX" register isn't necessary anymore, and should be replaced by "TAGZ" now.

Thanks for assistance,

Carlos

highend
Posts: 14994
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Batch renaming tags

Post by highend »

If you only use one tag...
Search for all items that contain the old tag, select them
Menu - Favorites - Tags - Edit Tags...

Replace the old tag with the new one, hit OK
Save your tag database (Files menu)
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Batch renaming tags

Post by bdeshi »

First save settings in XYplrer to save current tagstatus on disk. Now Open <xydata>\tag.dat in a respectable text editor, replace TAGX to TAGZ. Save the file, Restart XYplorer WITHOUT saving to load the updated tag db. ed: and do Favorites > Reload tag database. :)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

highend
Posts: 14994
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Batch renaming tags

Post by highend »

Restart XYplorer WITHOUT saving to load the updated tag db.
There is Favorites - Reload Tags Database

And as a script to not need to use an external editor:

Code: Select all

    $tagsFile = "<xydata>\tag.dat";
    $status = writefile($tagsFile, replace(readfile($tagsFile), "TAGX", "TAGZ"));
    #887;
One of my scripts helped you out? Please donate via Paypal

Post Reply