I have made a whole bunch of changes to where my files are stored due to an SSD failure.
I would like to now reapply the tags & comments I had stored for those files but to their new location.
So in the tag.dat file, it's very easy for me to find the tags&comments I'm interested in as they were all stored in one folder (I searched the folder name and I have 65 entries).
My plan was to simply replace in the tag.dat file, the path to those 65 entries with the new corrected one, then just restart XY.
Is that safe to do, will that work?
Just want to make sure in order not to irreparably mess up my tags!
Thanks!
How to copy Tags & Comments from one location to another?
Re: How to copy Tags & Comments from one location to another?
Maybe, maybe not. Depends if the tag.dat Data: section is sorted correctly afterwards
One of my scripts helped you out? Please donate via Paypal
Re: How to copy Tags & Comments from one location to another?
Huh....ok. So, how do I make sure? What should I be careful about? Thx!
Is there a better way?
Is there a better way?
Re: How to copy Tags & Comments from one location to another?
Copy everything into the clipboard and run a sort script over it, paste it back?
copytext formatlist(<clp>, "ec", <crlf>);
One of my scripts helped you out? Please donate via Paypal
Re: How to copy Tags & Comments from one location to another?
Let me make sure I get this right...
(I assume by clipboard, you mean the area in memory where copy/cut operations are stored, right?)
So I....
- copy all the tag.dat content to e.g. a text file
- make the changes as I described previously
- copy that, go to XY and run your script
- close XY, replace the content of the tag.dat with the clipboard
Correct?
(I assume by clipboard, you mean the area in memory where copy/cut operations are stored, right?)
So I....
- copy all the tag.dat content to e.g. a text file
- make the changes as I described previously
- copy that, go to XY and run your script
- close XY, replace the content of the tag.dat with the clipboard
Correct?
Re: How to copy Tags & Comments from one location to another?
No.
you change the paths in the data section of the tag.dat file, select everything (ofc in the data section again^^), CTRL + C, run the script, paste everything back into the data section, save the tag.dat file, restart XY WITHOUT saving settings now...
Or as a full script (you make the changes to your tag.dat before executing it!):
or as a GUI way:
Configuration | Information | Tags | Options | Database Check...
2 x OK button inside the message requesters...
you change the paths in the data section of the tag.dat file, select everything (ofc in the data section again^^), CTRL + C, run the script, paste everything back into the data section, save the tag.dat file, restart XY WITHOUT saving settings now...
Or as a full script (you make the changes to your tag.dat before executing it!):
Code: Select all
$tagFile = "<xydata>\tag.dat";
$content = readfile($tagFile);
$header = gettoken($content, 1, "Data:<crlf>");
$data = gettoken($content, 2, "Data:<crlf>");
end (!$data), "No tag(s) / comment(s) found in the Data: part, aborted!";
$data = formatlist($data, "ec", <crlf>);
writefile($tagFile, $header . "Data:<crlf>" . $data, , "tu");
exit "nr";
Configuration | Information | Tags | Options | Database Check...
2 x OK button inside the message requesters...
One of my scripts helped you out? Please donate via Paypal
Re: How to copy Tags & Comments from one location to another?
(sorry, had been away from the PC for a few days...)
Awesome, thanks so much!
Really kind of you to have taken the time
The 2nd script did it for me
Awesome, thanks so much!
Really kind of you to have taken the time
The 2nd script did it for me