Regex Rename/Move problem

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
xman
Posts: 133
Joined: 28 Nov 2009 22:57

Regex Rename/Move problem

Post by xman »

Let's say I have a file "a.txt". When I rename it the normal way (click on the name, edit, enter) to "b/a.txt", the program creates folder "b" and moves "a.txt" inside.

When I do the same using regex rename and this pattern:

Code: Select all

a.txt > b/a.txt
it behaves somewhat differently.

1) If the folder "b" doesn't exist, it gets created, but the file is not moved there. Instead, I get an error message "Error: The system cannot find the path specified.".

2) If the folder "b" exists and the item is successfully moved, the XY doesn't visually remove the file from current folder but instead changes its name to "b/a.txt". I need to go to another folder first and then go back to make the file disappear.
Clipboard-20170118-01.png
Clipboard-20170118-01.png (2.81 KiB) Viewed 1819 times
3) When the path length (including directory name where we move the file to) exceeds 256 characters, I get another error "Error: The filename, directory name, or volume label syntax is incorrect." and the file is not moved.

highend
Posts: 14611
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Regex Rename/Move problem

Post by highend »

a.txt > b/a.txt
Em?

Code: Select all

a\.txt > b\a.txt
Would be a correct pattern (which works fine here)

Btw:
a.txt
also matches
a,txt and a lot more as well
One of my scripts helped you out? Please donate via Paypal

xman
Posts: 133
Joined: 28 Nov 2009 22:57

Re: Regex Rename/Move problem

Post by xman »

So it seems it was the backslash, when I use "\" it seems to work correctly, even (3). When "/" is used it does what I just described.

highend
Posts: 14611
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Regex Rename/Move problem

Post by highend »

I remove this from the bug report section...
One of my scripts helped you out? Please donate via Paypal

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

Re: Regex Rename/Move problem

Post by admin »

In the next version XY will be tolerant about the forward slash here and handle the job as assumingly intended. Better than have a phantom file called "b/a.txt"... :)

Post Reply