We've had a couple of thousand files from a client who has named them all incorrectly with a double extension of .jpg.jpg
How can we rename then from *.jpg.jpg to *.jpg
Search and replace cannot do this as it ignores extensions.
Rename filename.jpg.jpg to filename.jpg
-
- Posts: 69
- Joined: 14 Feb 2013 09:29
Rename filename.jpg.jpg to filename.jpg
Thanks,
Sean Clarke
Sean Clarke
Re: Rename filename.jpg.jpg to filename.jpg
well, one solution is, you could select all such files then do an EMPTY "Set Extension" rename
[if you keep it empty, the file extension is removed, so file.jpg.jpg becomes file.jpg]
[if you keep it empty, the file extension is removed, so file.jpg.jpg becomes file.jpg]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 69
- Joined: 14 Feb 2013 09:29
Re: Rename filename.jpg.jpg to filename.jpg
Sammay - nice one - well done it worked perfectly
Thanks,
Sean Clarke
Sean Clarke
Re: Rename filename.jpg.jpg to filename.jpg
The "Batch Rename" function will remove (or change) extensions if you add the "/e" parameter at the end of the replacement text.
Re: Rename filename.jpg.jpg to filename.jpg
All of you,clarkedesign wrote:How can we rename then from *.jpg.jpg to *.jpg
Search and replace cannot do this as it ignores extensions.
are you not testing or proving a statement before you write it or comment on it?
I just renamed test.jpg.jpg successfully using the "search and replace" rename command using this pattern: ".jpg/"
Of course it works since the first ".jpg" in this case IS part of the base name, not of the extension!
Last edited by autocart on 02 Jul 2015 07:43, edited 1 time in total.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
Re: Rename filename.jpg.jpg to filename.jpg
I want to emphasize for any other readers that, as you half way mentioned, this seems to be working only with "Batch Rename", but not with "Search and Replace".Garonne wrote:The "Batch Rename" function will remove (or change) extensions if you add the "/e" parameter at the end of the replacement text.
In the example at hand to rename "test.jpg.jpg" to "test.jpg" do a "Batch Rename" with this pattern: "*/e" That's it.
::help "idh_menfile.htm#idh_menfilespecrename";help file wrote:Batch Rename Switches
/e for Extensions: Note that the original file extensions remain unchanged. However there's an easy way to actually change the extensions: append /e to the pattern! The /e switch simply means: drop the original extension. Then it depends on the pattern whether a new extension is supplied or not.
Despite all that, Sammay's solution is the most elegant, IMHO.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
Re: Rename filename.jpg.jpg to filename.jpg
Renaming File Extensions can be very handy when trying to "Rename" one file name to another. There are many programs on the web that can help you do this.
Here is easy and simple method
rename myfile.JPG->temp
and then
rename temp->myfile.jpg
Here is easy and simple method
rename myfile.JPG->temp
and then
rename temp->myfile.jpg