mass rename of file ext ?

T

Tim

I have a large folder that I need to rename the file extension. The format
is as follows:

xxx.jpg.001.14c.bak

The .001 is uniform...the 14x.bak varies from file to file.

What I need is this:

nice pic.jpg.001.14c.bak to this nice pic.jpg

Is there a way to wildcard this so I do not have to rename all 200 files
individually ?

Thanks, Tim

XP pro ver 3
 
J

John McGaw

Tim said:
I have a large folder that I need to rename the file extension. The format
is as follows:

xxx.jpg.001.14c.bak

The .001 is uniform...the 14x.bak varies from file to file.

What I need is this:

nice pic.jpg.001.14c.bak to this nice pic.jpg

Is there a way to wildcard this so I do not have to rename all 200 files
individually ?

Thanks, Tim

XP pro ver 3

There are quite a few mass renaming programs available. Personally, I use
"The Rename" http://www.herve-thouzard.com/the-rename which is quite
flexible but a little bit quirky when it comes to the interface but I've
been using it for so long that I hardly notice. Good thing is that it is
free so if you didn't like it you can uninstall it with no loss besides a
little time.
 
B

BillW50

In John McGaw typed on Mon, 07 Sep 2009 13:03:19 -0400:
There are quite a few mass renaming programs available. Personally, I
use "The Rename" http://www.herve-thouzard.com/the-rename which is
quite flexible but a little bit quirky when it comes to the interface
but I've been using it for so long that I hardly notice. Good thing
is that it is free so if you didn't like it you can uninstall it with
no loss besides a little time.

I love the freeware Bulk Rename Utility 2.1 by Jim Willsher myself (from
2004). He has later versions out too, but they really get complicated.
2.1 is still easy to use and does anything anyway.
 
L

Lem

BillW50 said:
In John McGaw typed on Mon, 07 Sep 2009 13:03:19 -0400:

I love the freeware Bulk Rename Utility 2.1 by Jim Willsher myself (from
2004). He has later versions out too, but they really get complicated.
2.1 is still easy to use and does anything anyway.

In addition to being a great file viewer, freeware IrfanView has a batch
conversion/rename facility.
 
B

BillW50

In Lem typed on Mon, 07 Sep 2009 15:30:36 -0400:
In addition to being a great file viewer, freeware IrfanView has a
batch conversion/rename facility.

Yeah I know. But once you bulk rename with the Bulk Rename Utility,
nothing else comes close or as fast.
 
A

AJR

Bulk changing of file "extensions"??? Changing the file extension also
changes the file association - risky at best.

Tim - evidently the files are backup files, if so, the extension was
assigned by the backup program - restoration may be a problem.
 
M

M.I.5¾

Tim said:
I have a large folder that I need to rename the file extension. The
format is as follows:

xxx.jpg.001.14c.bak

The .001 is uniform...the 14x.bak varies from file to file.

What I need is this:

nice pic.jpg.001.14c.bak to this nice pic.jpg

Is there a way to wildcard this so I do not have to rename all 200 files
individually ?

If all the files are in a similar format then you can do this from a command
window.

Fot the example cited use:

ren "*.jpg.001.14c.bak" "*.jpg"

If the numerical part varies try:

ren "*.jpg.???.???.bak" "*.jpg"

Adjust as required.
 
R

Richard.Williams.20

I have a large folder that I need to rename  the file extension.  Theformat
is as follows:

xxx.jpg.001.14c.bak

The .001 is uniform...the 14x.bak varies from file to file.

What I need is this:

nice pic.jpg.001.14c.bak       to this      nice pic.jpg

Is there a way to wildcard this so I do not have to rename all 200 files
individually ?

Thanks, Tim

XP pro ver 3




I wrote a nice script for you. I am adding comments so you can see
what the script is doing, and change as requirements change.

The idea is that you have files in folder C:/folder (for example) that
match pattern *.jpg.*. You want to drop the part after the .jpg in the
new name.



# Script jpgrename.txt
cd "C:/folder"
# Collect list of files.
var str list ; lf -n "*.jpg.*" > $list
# Go thru files one by one.
while ($list <> "")
do
# Get the next file.
var str file ; lex "1" $list > $file
# $file has full path. Create the new name
# by cutting the name at .jpg.
var str newname ; stex -p "^/^l[" $file > $newname
stex -c "^.jpg^l[" $newname > null
# Original file is in $file. New name is in $newname. Rename.
system rename ("\""+$file+"\"") ("\""+$newname+"\"")
done


Script is in biterscripting ( http://www.biterscripting.com ) . To
try, save the script as C:/Scripts/jpgrename.txt, start
biterscripting, enter the following command.

script jpgrename.txt


I have not tested it. Test it first. Change the "C:/folder" to
appropriate path before testing.

Richard
 
S

square/circle

Tim said:
I have a large folder that I need to rename the file extension. The format
is as follows:

xxx.jpg.001.14c.bak

The .001 is uniform...the 14x.bak varies from file to file.

What I need is this:

nice pic.jpg.001.14c.bak to this nice pic.jpg

Is there a way to wildcard this so I do not have to rename all 200 files
individually ?

Thanks, Tim

XP pro ver 3
------------------------

@echo off
set "var="
echo %1
set /p "var=Enter a new extension for the folder (enter alone to abort): "
if not defined var goto :EOF
pushd "%~f1"
ren "*.*" "*.%var%"
popd

--------------------------

copy the above to notepad, do a 'save as' and name it 'renXP.bat'. (make
sure you click on 'all files' in notepad or it will add a .txt to the
end.) when you save it, save it to your 'sendto' folder, or the xp
equivalent. (I use 98se, but this batch file is for XP.)

now go to the folder where all your files are kept, right-click on it
and choose renXP... it will bring up a dos box where it will ask for
the number of letters in the new extention.... in your case and in 99%
of others, it will be 3. Next, simply enter the extention, ie, jpg, and
voila, they are all renamed to that extention. when it is finished,
click any key then close it.
it is so simple to use and always at your finger tips via a right click
on a folder.

S/C
 
S

SC Tom

Tim said:
I have a large folder that I need to rename the file extension. The
format is as follows:

xxx.jpg.001.14c.bak

The .001 is uniform...the 14x.bak varies from file to file.

What I need is this:

nice pic.jpg.001.14c.bak to this nice pic.jpg

Is there a way to wildcard this so I do not have to rename all 200 files
individually ?

Thanks, Tim

XP pro ver 3

I've used this freebie since the late 90's for bulk renaming of files. It's
very simple to use, works quickly, and doesn't require any installation.
Just unzip to the folder of your choice and run it. It runs on everything
from W95 through Vista.

http://rname-it.10001downloads.com/

SC Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top