I believe I found a bug with the "COPYAS" script function

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Meester
Posts: 24
Joined: 18 Jun 2010 23:18

I believe I found a bug with the "COPYAS" script function

Post by Meester »

I'm using the syntax as follows:
copyas '* - Backup <datem yyyy-mm-dd>.?';

When I select several files then run this script. It will take the modified date from one of the files and apply it to all. So if all the files have different modified dates then only one file will have the correct modified date and all the others will be wrong. :roll:
Attachments
Copyas error.png
Copyas error.png (22.95 KiB) Viewed 1109 times

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

Re: I believe I found a bug with the "COPYAS" script function

Post by admin »

The usage of "<datem" variables in a way that they are resolved individually for each selected item has not been advertised in the documentation as far as I see. So this is rather a feature wish. And it makes total sense. The next version will siupport it. (Note that you will have to pass the argument in single quotes in that next version to make it work as expected -- otherwise the date variable is resolved before the argument is passed to CopyAs.)

DmFedorov
Posts: 715
Joined: 04 Jan 2011 16:36
Location: Germany

Re: I believe I found a bug with the "COPYAS" script function

Post by DmFedorov »

Confirmed.
But I've always used Backup Here first and only then special Batch rename. I have never used this feature before.
Attachments
(02.24.2011 08_04_34).gif
(02.24.2011 08_04_34).gif (29.04 KiB) Viewed 1095 times

DmFedorov
Posts: 715
Joined: 04 Jan 2011 16:36
Location: Germany

Re: I believe I found a bug with the "COPYAS" script function

Post by DmFedorov »

Edit: I do not know why, but I did not see the answer Admin, when I wrote. It just was not there.

Admin
I believe I found a bug with the "COPYAS" script
And I believe I found other bug with the "COPYAS" script

Try:
Select the directory in the tree. Then menu Scripting/Run script. Then paste function in window and OK.
In the beginning it will be written that a new directory ". - Backup" doesn't exist and script create this folder, and then there will be a window that the Location is unavailable, and I'll get a folder with no content

If after that you fulfill this script once again, script will create new directorie through a numerical suffix (- Backup -01) without problems, but date neither in files nor in folders won't be specified.

I have started to do such reservation because at the first attempt to use this script to me have been written
"The focus needs to be on Tree or List for this function."
And I have tried to make focus on a tree.

Post Reply