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
Renaming does not seem to work..
Re: Renaming does not seem to work..
No time to check this but if you just want the job done, you could use
RegExp Rename... instead
RegExp Rename... instead
Code: Select all
46.log$ > 46_.log
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Renaming does not seem to work..
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
FAQ | XY News RSS | XY Twitter
Re: Renaming does not seem to work..
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: \ / : * ? " < > |
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: \ / : * ? " < > |
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Renaming does not seem to work..
Which version of XY are you using?
FAQ | XY News RSS | XY Twitter
Re: Renaming does not seem to work..
Version 16.30.
thanks,
John
thanks,
John
-
- Site Admin
- Posts: 60558
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Renaming does not seem to work..
Too old. The /e switch was added in v17.20.0102.
FAQ | XY News RSS | XY Twitter
Re: Renaming does not seem to work..
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
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
Re: Renaming does not seem to work..
Have you tried this with a space before the /e flag?john3774 wrote:.bmp/2018.bmp/e
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%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)