renameitem("newname", , 8) problem

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

: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: Use Your Profile Or Signature
We strongly 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, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
Norn
Posts: 521
Joined: 24 Oct 2021 16:10

renameitem("newname", , 8) problem

Post by Norn »

Renames a file or folder.
8: Silent overwrite on name collision.

Is this a bug?

Code: Select all

 new("TestFolder", "dir"); 
 new("TestFolder2", "dir");
 selectitems "TestFolder2"; wait '1000';
 renameitem("TestFolder", , 8);
Renaming to non-existing name works:

Code: Select all

 new("TestFolder", "dir"); 
 new("TestFolder2", "dir");
 selectitems "TestFolder2"; wait '1000';
 renameitem("TestFolder3", , 8);
Last edited by Norn on 03 Aug 2022 18:06, edited 1 time in total.
Windows 11 24H2 @100% 2560x1440

Norn
Posts: 521
Joined: 24 Oct 2021 16:10

Re: renameitem("newname", , 8) is invalid

Post by Norn »

This is probably not the thing to do with renaming, I'll go moveto()

Code: Select all

moveto $newFolder, "$folder\*",,2,,2;
Last edited by Norn on 28 Aug 2022 01:54, edited 1 time in total.
Windows 11 24H2 @100% 2560x1440

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

Re: renameitem("newname", , 8) problem

Post by admin »

Next beta renameitem("newname", , 8) will work for folders if the target folder is empty.

Post Reply