Tag Backup - Rev. 1 / 2012/09/15

Discuss and share scripts and script files...
Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Tag Backup 0.99

Post by Marco »

Argh, a mass destruction weapon!! :mrgreen:
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

xycooper
Posts: 28
Joined: 26 Sep 2010 22:49
Location: USA

Re: Tag Backup 0.99

Post by xycooper »

I'm very interested in backing up Comments/Tags and copying them. This might sound dumb but could you explain how this script functions. :oops:

Is " Transfer Tags & comments from XYplorer to ADS" backing them up
and " Transfer Tags & comments from ADS to XYplorer" restore

If so it's something I've been waiting for. :appl:
XYplorer - Simply the Best!

Kucera
Posts: 108
Joined: 31 Mar 2008 01:37
Location: Canada
Contact:

Re: Tag Backup 0.99

Post by Kucera »

admin wrote:[
Well, should I? This thread does not really get much response. I think your idea is totally great, but nobody is watching?
Oh yes, please! :) I didn't know this was going on, thanks, Marco (and Don).
BUT - please, let me know just how to use the script!
Right now, I loaded the script, chosing XY to ADS and got on
Line 3: writefile($item:tag.dat,$info,,"tu")
the Error: The filename directory name, or volume label syntax is incorrect; when I hit continue, it ends with nothing happening. Copying a file with a Comments does not show the comment in the next window.
Then
If I re-run the script, chosing the "copy to xyplorer",
Line 2: $info = readfile($item:tag.dat,"t"); and
Line 9: writefile($item:tag.dat,,,"b");

show the identical error msg: The filename, directory name, or volume label syntax is incorrect.
What am I doing wrong?
regards Emil

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Tag Backup 0.99

Post by Marco »

Ok, to use the script first select one tagged file, and then run the script with stepping enabled. Do you get any error message?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Kucera
Posts: 108
Joined: 31 Mar 2008 01:37
Location: Canada
Contact:

Re: Tag Backup 0.99

Post by Kucera »

Guess what! no error message this time. I bet I did not have any files selected when I tried it before, and another likely reason - tried to copy to my RAM disk and it is only FAT format... Just to recapitulate, is this the correct sequence (from pane 1 to pane 2 in this case):
1. select files
2. run the script with XY to ADS
3. copy the files
4. switch to target pane
5. run the script with ADS to XY
Now - do I understand correctly that the files that need the comment/ tag copied, must be selected?
And how about, possibly, automating the pane switching as well? :-)
Anyway, thanks very much!
Regards Emil

xycooper
Posts: 28
Joined: 26 Sep 2010 22:49
Location: USA

Re: Tag Backup 0.99

Post by xycooper »

Now I understand thank you kucera for posting.
Works great for me. I think it would be better if this could be incorporated into the copy function itself.
It would even better if this was feature of XYplorer copy function. :biggrin:
XYplorer - Simply the Best!

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Tag Backup 0.99

Post by Filehero »

admin wrote:I think your idea is totally great, but nobody is watching?
I think the idea is great and I am watching. However, I don't use any tagging, that's why I'm just reading.

Cheers,
Filehero

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Tag Backup 0.99

Post by admin »

Kucera wrote:1. select files
2. run the script with XY to ADS
3. copy the files
4. switch to target pane
5. run the script with ADS to XY
Just to make sure: It would be no problem at all for XY to copy the tags right-away when copying files. It's not done on purpose. Because tag.dat would grow and grow.

So storing the tags via ADS (instead of in an ever-growing tag.dat) with a backup would just be a way to be able to later restore the tags in the unlikely mergency case of a restore operation.

But at the moment I'm hesitating to add automatic ADS support. ADS has kind of a bad reputation, so bad that even Windows itself stopped using it since version 7 (or Vista, not sure). There are also other complications that I don't really need. In short: It's too dirty. :)

So, Marco, go ahead and write your script! :mrgreen:

kodyman
Posts: 222
Joined: 09 Apr 2011 04:05

Re: Tag Backup 0.99

Post by kodyman »

admin wrote:
Marco wrote:
admin wrote:I thought in a backup situation one would like to copy the tags from the sources to the ADS of the targets. The targets would not have tags anyway since XY does not copy the tags. So no need to remove any tags.
Ah gotcha, and flawless logic by the way.
Are you planning about including this routine into backupto()? Because if so I stop developing the script, else I need to sit down and figure out how I can efficiently scan all the backuped files to see if forks in destination need to be added.
Well, should I? This thread does not really get much response. I think your idea is totally great, but nobody is watching?
I would like to see you add this.
I've been watching, not logged in, but since it was mostly a coding discussion not able to add anything.

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Tag Backup 0.99

Post by Marco »

admin wrote:So, Marco, go ahead and write your script! :mrgreen:
Ok, let's dive into coding! :D

New code in the first post.
Last edited by Marco on 15 Sep 2012 15:52, edited 1 time in total.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

xycooper
Posts: 28
Joined: 26 Sep 2010 22:49
Location: USA

Re: Tag Backup 0.99

Post by xycooper »

What about adding a option to copy tags & comments on copy. I don't always need to copy all the data with a file only on special occasions.
When I move a program to a flash drive to share with someone there is no need for all that.
If I want to copy it to a flash drive for my own use it would be great to have that data with it.


I also watch this forum/thread (the only one I do watch)have for several years now.
I don't usually have much to say or add but enjoy learning from you all. I would like to say thank you Don for all your heard work on XYplorer and listening.
To everyone else thanks for all the Scripts and tips.
XYplorer - Simply the Best!

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Tag Backup 0.99

Post by admin »

xycooper wrote:What about adding a option to copy tags & comments on copy. I don't always need to copy all the data with a file only on special occasions.
When I move a program to a flash drive to share with someone there is no need for all that.
If I want to copy it to a flash drive for my own use it would be great to have that data with it.
You mean via ADS or via tag.dat?

xycooper
Posts: 28
Joined: 26 Sep 2010 22:49
Location: USA

Re: Tag Backup - Rev. 1 / 2012/09/15

Post by xycooper »

I guess I was refiring to the tag.dat thinking this would help keep the file from getting to large to quick.
I thought if it was a option to copy the tag/comment data with the file only if needed.
This might be a good compromise.

Being that I know very little about all this(but learning a lot by watching the forum) I have no useful input but my opinion on weather to use ADS or tag.dat.
XYplorer - Simply the Best!

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Tag Backup - Rev. 1 / 2012/09/15

Post by admin »

xycooper wrote:I guess I was refiring to the tag.dat thinking this would help keep the file from getting to large to quick.
I thought if it was a option to copy the tag/comment data with the file only if needed.
This might be a good compromise.

Being that I know very little about all this(but learning a lot by watching the forum) I have no useful input but my opinion on weather to use ADS or tag.dat.
The point is that with tag.dat the tags are not "with the files" but just in tag.dat pointing to the files. When plug out your flash drive the paths in tag.dat get invalid and point to nothing. No tags are on the flash drive at all. That's why I decided not to copy the tags to the targets of copy operations.

xycooper
Posts: 28
Joined: 26 Sep 2010 22:49
Location: USA

Re: Tag Backup - Rev. 1 / 2012/09/15

Post by xycooper »

My bad I forgot that tag.dat just points to the file.
I guess its just a unrealistic dream that XYplorer could attach or identify a file without modifying it.

How does ADS differ from tag.dat?
XYplorer - Simply the Best!

Post Reply