Renaming files mistake, now missing the dot before filetype, how to restore?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
nordic45
Junior Member
Junior Member
Posts: 3
Joined: 2020-02-27, 14:35 UTC

Renaming files mistake, now missing the dot before filetype, how to restore?

Post by *nordic45 »

I renamed a lot of files last night to get rid of "." in filenames. Lets say I wanted "my.hound.avi" to be renamed to "my dog.avi". After I did this, all files in root, on all disks, now misses the "." before the filetype. File is now named "my dog avi" and not "my dog.avi". An easy way to fix this?
(This is all sort of filetypes. avi, mkv, iso, img, jpg and so on).
User avatar
XuaLee
Junior Member
Junior Member
Posts: 46
Joined: 2020-01-08, 20:14 UTC
Location: Vienna, Austria

Re: Error renaming files, missing . before filetype

Post by *XuaLee »

When ALL extensions having 3 length:
MultiRename with FileName [N1--5] and Ext [N-3-1]
Windows 10 Pro 64bit 22H2 19045.4170 | Total Commander (x64) 11.03 #44961
nordic45
Junior Member
Junior Member
Posts: 3
Joined: 2020-02-27, 14:35 UTC

Re: Error renaming files, missing . before filetype

Post by *nordic45 »

I must admit I don't have the knowledge to understand this...
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Error renaming files, missing . before filetype

Post by *Horst.Epp »

Use the Search & Replace part in MRT
Importand Remove the [e] selection
Search for: .
Replace with: <clear> or whatever you like
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Error renaming files, missing . before filetype

Post by *Usher »

2Horst.Epp
It's too late for your advice, all dots are already removed…
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Error renaming files, missing . before filetype

Post by *Horst.Epp »

Usher wrote: 2020-02-27, 18:30 UTC 2Horst.Epp
It's too late for your advice, all dots are already removed…
If he did it without any backup yes.
I don't understand why he didn't see the preview of the rename,
it clearly shows when the extensions are removed and all other sort of mistakes.
Also there is an Undo button which most of the time helps.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: Error renaming files, missing . before filetype

Post by *StatusQuo »

2nordic45
in MRT:
  • activate checkbox [X] E
  • activate checkbox [X] RegEx
  • search for: (.*)( {1}|\.{1})(.*)$
  • replace with: $1.$3
This restores the dot in place of the last found space (and leaves files unchanged that already have a dot).
Files that had spaces or dots in the extension will need manual correction.
Before executing you can check the results in the preview window.

Edit: One restriction: "my dog.avi test" would get an additional dot: "my dog.avi.test".
Should be no problem for you, as you removed all dots. But maybe some RegEx expert has an explanation or better solution?
Last edited by StatusQuo on 2020-02-27, 19:20 UTC, edited 3 times in total.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: Error renaming files, missing . before filetype

Post by *StatusQuo »

Horst.Epp wrote: 2020-02-27, 18:52 UTC Also there is an Undo button which most of the time helps.
Yes, that would be the easiest solution - if this was was all done by the last execution in MRT.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
nordic45
Junior Member
Junior Member
Posts: 3
Joined: 2020-02-27, 14:35 UTC

Re: Error renaming files, missing . before filetype

Post by *nordic45 »

I have no managed to rename most of the files by searching for " " (space) and replacing it with ".". So now most of my files is named "my.dog.today.avi"
But, I have some 500 files called numbers only. Is there a possibility to get the original filename back?
Post Reply