Page 1 of 1

Renaming does not seem to work..

Posted: 03 Jun 2017 19:02
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

Re: Renaming does not seem to work..

Posted: 03 Jun 2017 19:21
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

Re: Renaming does not seem to work..

Posted: 04 Jun 2017 15:36
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

Re: Renaming does not seem to work..

Posted: 26 Jun 2017 18:45
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: \ / : * ? " < > |

Re: Renaming does not seem to work..

Posted: 26 Jun 2017 18:55
by admin
Which version of XY are you using?

Re: Renaming does not seem to work..

Posted: 27 Jun 2017 21:19
by john3774
Version 16.30.
thanks,
John

Re: Renaming does not seem to work..

Posted: 27 Jun 2017 22:13
by admin
Too old. The /e switch was added in v17.20.0102. :|

Re: Renaming does not seem to work..

Posted: 21 Feb 2018 00:46
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

Re: Renaming does not seem to work..

Posted: 21 Feb 2018 03:32
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.