Page 1 of 1

Regex Rename/Move problem

Posted: 18 Jan 2017 16:38
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 1822 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.

Re: Regex Rename/Move problem

Posted: 18 Jan 2017 16:53
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

Re: Regex Rename/Move problem

Posted: 18 Jan 2017 16:59
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.

Re: Regex Rename/Move problem

Posted: 18 Jan 2017 17:28
by highend
I remove this from the bug report section...

Re: Regex Rename/Move problem

Posted: 25 Jan 2017 10:40
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"... :)