Renaming does not seem to work..

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
john3774
Posts: 27
Joined: 27 Aug 2010 16:54

Renaming does not seem to work..

Post by john3774 »

I have multiple files like this:
abcdef_200.46.log

For all of these files, I want to rename to :
abcdef_200.46_.log

I used the Search and Replace, with this pattern:
46.log/46_.log
(I don't want to rely on the 46 alone, rather 46 before the .log extension)
Search and Replace does not change the 46 to 46_ . I looked around on topics on this, and I have
Configuration/Search and Replace/Replace / Exclude extensions unchecked. It does the same
if it is checked.
Is the extra '.' between 200 and 46 messing things up?

thanks,
John

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

Re: Renaming does not seem to work..

Post by highend »

No time to check this but if you just want the job done, you could use
RegExp Rename... instead

Code: Select all

46.log$ > 46_.log
One of my scripts helped you out? Please donate via Paypal

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

Re: Renaming does not seem to work..

Post by admin »

You should append the /e switch (= include extensions), else the sequence "46.log" is looked for only in the base name (and not found).

Code: Select all

46.log/46_.log /e

john3774
Posts: 27
Joined: 27 Aug 2010 16:54

Re: Renaming does not seem to work..

Post by john3774 »

Including the /e does not seem to work. I am using Search and Replace.
For this example
trying to rename test2.bmp to: test_2.bmp
with this command: 2.bmp/_2.bmp /e

I get a dialog box with the following error:
This is not a valid filename:

_2.bmp /e

The following characters are not allowed: \ / : * ? " < > |

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

Re: Renaming does not seem to work..

Post by admin »

Which version of XY are you using?

john3774
Posts: 27
Joined: 27 Aug 2010 16:54

Re: Renaming does not seem to work..

Post by john3774 »

Version 16.30.
thanks,
John

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

Re: Renaming does not seem to work..

Post by admin »

Too old. The /e switch was added in v17.20.0102. :|

john3774
Posts: 27
Joined: 27 Aug 2010 16:54

Re: Renaming does not seem to work..

Post by john3774 »

I'm trying to add characters to the end of a filename with .BMP extension. Unlike previous tries, where the Search and Replace option on :
xyz.bmp/xyz2018.bmp/e would work with the e flag,

If I don't have characters in front of the '.bmp', this generates an error.
So this:
.bmp/2018.bmp/e generates an error. (This is not a valid filename, special characters not allowed).
I have Version 18.00.
Thanks, John

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Renaming does not seem to work..

Post by RalphM »

john3774 wrote:.bmp/2018.bmp/e
Have you tried this with a space before the /e flag?
Another option would be to forget about the extension and just do a Batch Rename with *2018 but this would rename any selected file not just BMP's.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

Post Reply