Last folder highlight

Features wanted...
ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

Here are the screenshots to illustrate:

Before rename (of the top RAR file):

http://i32.tinypic.com/2zznwjl.jpg

After rename (of the top RAR file):

http://i26.tinypic.com/p3q5e.jpg

Hope it helps ;)

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Oh, right, yes in your case it adds a suffix number, and I think it is because there is already a file with the same name : the very file you're renaming !!

In Windows, files "foobar", "FooBar" and "FOOBAR" are the same, even though you can rename it to change the case.

So the problem here is that XY sees a duplicates with itself (file that is being renamed) while it shouldn't, obviously. Happens when you try to rename a file "readme.txt" to "ReadMe.txt" using Batch Rename as well.

And that indeed would actually be a little bug I believe!

----

Unrelated sidenote regarding what's been said before: Another nice thing would be the support of multi-line scripts in Catalog ! Right now I have to either use a single-line script, but it's not that fun to work on it, or use a file but for often used scripts, I'm assuming that means a lot of disk access to read the script file every time, which might not be so good...
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

I'm no longer XYplorer bug virgin! :lol:

Hope to hear admin's thoughts on this about fixing perhaps? Cheers in advance 8)

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

PS: While waiting for the bugfix which will, I'm sure, be there soon, you can use this instead on your script, should work just fine (as long as the file you rename as an extension) :

Code: Select all

 rename re, "^(.*)\.(.*)$>$name.$2";
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

jacky wrote:PS: While waiting for the bugfix which will, I'm sure, be there soon, you can use this instead on your script, should work just fine (as long as the file you rename as an extension) :

Code: Select all

 rename re, "^(.*)\.(.*)$>$name.$2";
How would I integrate it into my existing script?

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Here, there you go, this should work as expected :

Code: Select all

regexreplace $name, <curitem>, "^.+\\([^\\]+?)\\[^\\]+?.*$", "$1";
 rename re, "^(.*)\.(.*)$>$name.$2";
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

Yes, works perfectly! Thanks a bunch. It's still a little bug though :wink:

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

Post by admin »

ivan wrote:Yes, works perfectly! Thanks a bunch. It's still a little bug though :wink:
Yep, just fixed it. Good little find. :)

Post Reply