Page 1 of 1

Batch renaming tags

Posted: 07 Mar 2016 13:25
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

Re: Batch renaming tags

Posted: 07 Mar 2016 13:34
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)

Re: Batch renaming tags

Posted: 07 Mar 2016 13:35
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. :)

Re: Batch renaming tags

Posted: 07 Mar 2016 13:40
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;