Multi Renamed My Extensions Away
Moderators: white, Hacker, petermad, Stefan2
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
Multi Renamed My Extensions Away
I had a bunch of files with useless info between a date in the file name and their extension. In a bunch of directories.
So I:
- Searched for "201" (all files were from 2011-2018)
- Added all the files to the Listbox
- Multirenamed, searching for "201*" and replacing with a blank
It was successful - it took away all the crap. But it also erased the file extension!
I closed Total Commander before I realized this, so Undo is off the table.
Any easy way to go back and re-add file extensions (They're all docx)?. I don't have a common thing, I don't think, to search for.
So I:
- Searched for "201" (all files were from 2011-2018)
- Added all the files to the Listbox
- Multirenamed, searching for "201*" and replacing with a blank
It was successful - it took away all the crap. But it also erased the file extension!
I closed Total Commander before I realized this, so Undo is off the table.
Any easy way to go back and re-add file extensions (They're all docx)?. I don't have a common thing, I don't think, to search for.
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
Search for with "RegEx" checked,
feed to Listbox,
Multirename with Extension:
and Search & Replace: ".." with "."
just in case there are dots in your file names.
Code: Select all
0\d\d$
feed to Listbox,
Multirename with Extension:
Code: Select all
[E].docx
just in case there are dots in your file names.
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
> it also erased the file extension!
Note the []E checkbox next time. Press F1 key in MRT to read more.
>so Undo is off the table
Last Undo is still available after closing, just launch the MRT again and try Undo.
>Multirename with extension [E].docx
Just 'docx' would be enough in Extension box,
>Search for 0\d\d$
>Replace ".." with "."
There can't be trailing dots, as this is not allowed, and also your RegEx wouldn't match them, as you search for a digit right at the end ('$').
Note the []E checkbox next time. Press F1 key in MRT to read more.
>so Undo is off the table
Last Undo is still available after closing, just launch the MRT again and try Undo.
>Multirename with extension [E].docx
Just 'docx' would be enough in Extension box,
>Search for 0\d\d$
>Replace ".." with "."
There can't be trailing dots, as this is not allowed, and also your RegEx wouldn't match them, as you search for a digit right at the end ('$').
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
That's cool!Alonzo Mosley wrote:...
. Willl read more in F1 to figure out. Thanks!
The '0' is a literal char, just a zero digit.Alonzo Mosley wrote:... I'm still not clear what the "0\d\d$" did. ...
Alonzo Mosley"> Actually almost every filename ends with three digits ("0xx"). ...
\d and $ are noted in the help.
Tip: open the MRT, then press F1 key. Next click at the text "regular expressions." to open the regex help.
Still unclear? Just ask.
Not if there was a file "File.001.docx" that is now "File.001"Stefan2 wrote:>Multirename with extension [E].docx
Just 'docx' would be enough in Extension box,
>Replace ".." with "."
There can't be trailing dots, as this is not allowed, and also your RegEx wouldn't match them, as you search for a digit right at the end ('$').
[E].docx and ".." -> "." is meant to be used in one go.
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
Not to be completely dense, but I'm trying to learn how to do this right. And I'll confess the F1 help is confusing me more!
I grabbed a bunch of files and fed them into the MultiRename tool.
If I do the "Search for: '201*'" and Replace blank, no matter what it wants to erase the [dot]extension...
I have checked and unchecked "[E]" under the Replace box. I have added ".docx" to the "Extension" field and also "[E]" into the Extension field.
(I know I can rename '201*' with '.docx', but what would I do if they weren't all the same file type?)
Sorry to be a pest!
I grabbed a bunch of files and fed them into the MultiRename tool.
If I do the "Search for: '201*'" and Replace blank, no matter what it wants to erase the [dot]extension...
I have checked and unchecked "[E]" under the Replace box. I have added ".docx" to the "Extension" field and also "[E]" into the Extension field.
(I know I can rename '201*' with '.docx', but what would I do if they weren't all the same file type?)
Sorry to be a pest!
If you un-check the "[_]E"-option on the search and replace part of MRT,
your search and replace is only done on the base name part, ignoring the extension.
(In MRT press F1 key and read below of "Search & Replace" at the first "[E]" occurrence)
TEST
FROM:
2011-01-02 Test ABC.docx
2012-02-03 Test ABCD.PDF
2013-03-04 Test ABCDE.TXT
TO:
.docx
.TXT
USE:
Name: [N]
Extension: [E]
Search: 201*
Replace: <clear>
[_][E]
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
FROM:
2011-01-02 Test ABC.docx
2012-02-03 Test ABCD.PDF
2013-03-04 Test ABCDE.TXT
TO:
USE:
Name: [N]
Extension: [E]
Search: 201*
Replace: <clear>
[X][E]
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
BTW, if you just want to remove the base name part, use
Name:
Extension: [E]
Search:
Replace:
Or to enter something new in one go:
Name: Vacation 2018 - [C:2]
Extension: [E]
Search:
Replace:
Still unclear? Just ask.
Best post a few before/after example names.
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC