Hi
well i have xyplorer installed on my dekstop w10 and laptop w7 both 64bit
and i have a portable version on my external usb3 stick and portable hard disk usb3
can i export tags and labels for example from the portable version to another portable version or installation version?
in short can i export tags and labels from my xyplorer portable (i use at work) to my w10 pro installation version ?
thanks
can i export tags and labels ?
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: can i export tags and labels ?
Sure
Code: Select all
rtfm "idh_scripting_comref.htm#idh_sc_tagexport";One of my scripts helped you out? Please donate via Paypal
-
giuliastar
- Posts: 365
- Joined: 14 Sep 2013 07:22
Re: can i export tags and labels ?
hihighend wrote:SureCode: Select all
rtfm "idh_scripting_comref.htm#idh_sc_tagexport";
should i add this command in the XYplorer's addressbar ?
and to import in another seperate xyplorer installation ?
thanks highend
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: can i export tags and labels ?
After reading the documentation and adding the correct parameters? Yes, the address bar would workshould i add this command in the XYplorer's addressbar ?
The remarks for that command mention what command you would need there?and to import in another seperate xyplorer installation ?
One of my scripts helped you out? Please donate via Paypal
-
giuliastar
- Posts: 365
- Joined: 14 Sep 2013 07:22
Re: can i export tags and labels ?
hihighend wrote:After reading the documentation and adding the correct parameters? Yes, the address bar would workshould i add this command in the XYplorer's addressbar ?
The remarks for that command mention what command you would need there?and to import in another seperate xyplorer installation ?
everyday i found out how powerful is xyplorer but even how it's complex
for example i want to export all the files tagged with yellow label
if i use tagexport([db], [path], [storage], [flags]) it creates a file from data\tag.dat (including all the tags)
is a good idea open the file tag.dat with notepad++ and copy what i need and paste in the tag.dat on the another xyplorer?
thanks
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: can i export tags and labels ?
You never explicitly said that you want to export a subset of items with specific tags / labels...
Possible? Sure, but it requires more scripting
Fastest way?
Look up what e.g. a yellow label is as an integer
regexmatches() the content of the tag.dat file for these items
write the matches into a new file, append the tag.dat header
import that file on another instance via tagload...
There are slower methods (with foreach loops which anybody should avoid if it
comes to a massive amount of possible entries)
Requires scripting as well
A script that can export labels...
Write your own / modify this one to do the same for tags...
Possible? Sure, but it requires more scripting
Fastest way?
Look up what e.g. a yellow label is as an integer
regexmatches() the content of the tag.dat file for these items
write the matches into a new file, append the tag.dat header
import that file on another instance via tagload...
There are slower methods (with foreach loops which anybody should avoid if it
comes to a massive amount of possible entries)
Em, [...] parameters are optional and IF they are used, they should be filled with correct values...if i use tagexport([db], [path], [storage], [flags]) it creates a file from data\tag.dat (including all the tags)
That does not work. Not without bringing these items in the correct sort order (the tag.dat requires this)is a good idea open the file tag.dat with notepad++ and copy what i need and paste in the tag.dat on the another xyplorer?
Requires scripting as well
A script that can export labels...
Write your own / modify this one to do the same for tags...
Code: Select all
$labelColor = "yellow";
$labels = "1;Red|2;Orange|3;Yellow|4;Green|5;Blue|6;Purple|7;Grey";
// ========================================================================
// == DO NOT CHANGE ANYTHING BELOW IF YOU DO NOT KNOW WHAT YOU ARE DOING ==
// ========================================================================
$pattern = gettoken(gettokenindex($labelColor, $labels, "|"), 1, ";");
$content = readfile("<xydata>\tag.dat");
$header = gettoken($content, 1, "Data:<crlf>");
$tags = gettoken($content, 2, "Data:<crlf>");
$matches = regexmatches($tags, "^[^|]+\|$pattern\|.*(?=\r?\n|$)", <crlf>);
writefile("<xydata>\exported_tags.dat", $header . "Data:<crlf>$matches");
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club