Script works in step mode but not in real time

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
Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Script works in step mode but not in real time

Post by Papoulka »

I can think of reasons why this might happen, and it may be a known characteristic. But I don't find any past discussions so it could be worth reporting. If it actually is a bug then a moderator can move it to that thread.

This script renames the current folder and reports the new name. It works correctly in "Try Script" step mode. However, when executed directly, it renames the folder but reports the old name.

Code: Select all

focus "T";
 rename, "NewName", , <curpath>;
 focus "L";
 $child = <curfolder>;
 msg $child;
This occurs both on my C: drive and on a USB drive. Windows 7 32-bit; XYplorer v14.30.000

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Script works in step mode but not in real time

Post by TheQwerty »

It's because it continues running the script before the renaming actually takes affect.

You might want to consider using the RenameItem function instead since it will return the new name.

Post Reply