Hello, i would like to know, how can i copy all tags and comments from a file to another?
Thanks in advance.
Tag and comment copying
Re: Tag and comment copying
By scripting it...
Only existing comments / tags are copied, if they are empty, the destination file will not store these empty tags / comment!
Only existing comments / tags are copied, if they are empty, the destination file will not store these empty tags / comment!
Code: Select all
$selected = <get SelectedItemsPathNames <crlf>>;
end (gettoken($selected, "count", <crlf>) != 2), "There are NOT two files selected!";
$text = "Is the first or the second selected item the source to copy from?";
$notes = "Enter either 1 or 2...";
$input = input($text, $notes, "1");
end (!regexmatches($input, "^(1|2)$")), "No source file defined, aborted!";
if ($input == 1) { $src = gettoken($selected, 1, <crlf>); $dst = gettoken($selected, 2, <crlf>); }
elseif ($input == 2) { $src = gettoken($selected, 2, <crlf>); $dst = gettoken($selected, 1, <crlf>); }
$comment = tagitems("cmt", , $src);
$tags = tagitems("tag", , $src);
if ($comment) { tagitems("cmt", $comment, $dst); }
if ($tags) { tagitems("tag", $tags , $dst); }
One of my scripts helped you out? Please donate via Paypal
Re: Tag and comment copying
Thank you very much Highend, its working perfectly!
Re: Tag and comment copying
This is probably a better one because it allows to copy tag(s) / comment to all selected files even in different multiple directories...
You can change its default behavior by modifying this variable at the beginning:
You can change its default behavior by modifying this variable at the beginning:
$copyEmpty = false; // Change to true if you want to clear tag(s) / comment if the source is empty
One of my scripts helped you out? Please donate via Paypal
Re: Tag and comment copying
Is it possible to somehow copy all tags and comments from a selected file in pane 1 to the selected file in pane 2. That would make things a lot easier.
With the current script it's only possible to copy when all files are in the samed folder. Unless of course im missing something and in that case please let me know.
Thanks again
With the current script it's only possible to copy when all files are in the samed folder. Unless of course im missing something and in that case please let me know.
Thanks again
Re: Tag and comment copying
See this one (v0.2), changelog:
Code: Select all
v0.2
+ Dual pane supported
One of my scripts helped you out? Please donate via Paypal
Re: Tag and comment copying
Excellent, this will speed things up!
Thank you again Highend
Thank you again Highend
Re: Tag and comment copying
Good evening,
After forum searching this thread looks like my question fits into it.
I have dual panes. Source on top, Target on bottom. There are TAGS on the folders in the Source pane. What I'd like to do is, if the folder exists in the Target pane, copy the TAG from the matching Source folder to the Target. No specific selections, just process all the folders in Source and check if it matches in Target, if so, copy the TAG.
I am attempting to script this and am thinking it would go something like this :
1. Get a list of folders in Source
2. Loop through the Source folders and check if a match is found in Target
3. If folder name matches, copy the Source TAG to the Target folder
Is this a good approach to this ? I didn't see any built-in tools to do this, so I assumed it was a job for scripting.
After forum searching this thread looks like my question fits into it.
I have dual panes. Source on top, Target on bottom. There are TAGS on the folders in the Source pane. What I'd like to do is, if the folder exists in the Target pane, copy the TAG from the matching Source folder to the Target. No specific selections, just process all the folders in Source and check if it matches in Target, if so, copy the TAG.
I am attempting to script this and am thinking it would go something like this :
1. Get a list of folders in Source
2. Loop through the Source folders and check if a match is found in Target
3. If folder name matches, copy the Source TAG to the Target folder
Is this a good approach to this ? I didn't see any built-in tools to do this, so I assumed it was a job for scripting.
Re: Tag and comment copying
Would work. But you don't want to do this in a
way, right?
Code: Select all
... outer loop over src folders
... inner loop over dst folders
check for a match
...
...
One of my scripts helped you out? Please donate via Paypal