#1 2009-06-17 15:19

newbie
Member
Registered: 2009-06-17
Posts: 2

Help with renaming selected files

Hello all,

I am not sure how to do the following and was hoping someone would be able to help me with this. This is a sample of the 1000+ files that I need to rename:

Original files:
D:\ExportData\TreeV\XYZ\8633\62883\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8635\62805\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8636\62789\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8649\62148\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8660\65121\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8660\65122\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8664\65119\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8664\65120\L2D1P1.tif
D:\ExportData\TreeV\XYZ\8665\65126\L2D1P1.tif

Need to rename to

D:\ExportData\TreeV\XYZ\8633\62883\L2D1P1.doc
D:\ExportData\TreeV\XYZ\8635\62805\L2D1P1.doc
D:\ExportData\TreeV\XYZ\8636\62789\L2D1P1.doc
D:\ExportData\TreeV\XYZ\8649\62148\L2D1P1.doc
D:\ExportData\TreeV\XYZ\8660\65121\L2D1P1.pdf
D:\ExportData\TreeV\XYZ\8660\65122\L2D1P1.pdf
D:\ExportData\TreeV\XYZ\8664\65119\L2D1P1.pdf
D:\ExportData\TreeV\XYZ\8664\65120\L2D1P1.pdf
D:\ExportData\TreeV\XYZ\8665\65126\L2D1P1.pdf

I have the complete paths as above (new format) in a .csv file, and can potentially convert it to any other format necessary.  As you can see, the top most common folder is XYZ below which they are in seemingly random folders. There are thousands of folders and thousands of images, but I need to rename about a 1000 files only, the names and paths of which I have.

Is there a way to do this using Renamer?

Thanks

Last edited by newbie (2009-06-17 15:19)

Offline

#2 2009-06-17 16:16

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Help with renaming selected files

Click the Export button on the main window and select "Import file paths and new names". Specify the CSV, Preview, confirm that this is what you want and then click Rename. Easy, right? smile

___________________________________________________________________________

Here's an alternate manual way of doing things if you want to do something similar in the future and for some strange reason don't have access to ReNamer (oh the horror! tongue):

If your CSV is of the format "OldNameFullPath, NewNameFullPath", then it's very easy to use a spreadsheet program like Excel etc. to create a batch file that will do what you want.

For example, if your CSV contents are as under:

C:\A\B\ABC.txt, C:\A\B\123.txt
C:\A\B\DEF.txt, C:\A\B\456.txt
and so on...

1) Open the CSV in Excel. You'll end up with OldNameFullPath in Column A, and NewNameFullPath in Column B.

2) Select Columns A & B, cut the contents and paste them in Columns B & C (so that Column A's contents i.e. OldNameFullPath are now in Column B, and similarly Column B's contents i.e. NewNameFullPath are now in Column C. Column A is now empty.

3) Type "ren" (without the quotes) in A1, then select and drag the mouse down the column till you have "ren" in every cell of Column A (drag down till you reach the point where there's no more data in Columns B & C).

4) Copy the contents of Columns A, B & C to Notepad. You should end up with something similar to the following:

ren C:\A\B\ABC.txt C:\A\B\123.txt
ren C:\A\B\DEF.txt C:\A\B\456.txt
and so on...

5) Save the file as "RenFiles.bat", run it and you're done!

P.S. It looks difficult but it is really a few seconds' job.

P.P.S. Make sure neither OldNameFullPath nor NewNameFullPath contain spaces, or else additional steps will have to be taken to place the two within double quotes.

Offline

#3 2009-06-17 16:41

newbie
Member
Registered: 2009-06-17
Posts: 2

Re: Help with renaming selected files

Jeez! Rename, ofcourse! Duh.. I tried the "Import file paths and new names" path, but it didn't work, so thought I would check.

Thanks a bunch! smile

Offline

Board footer

Powered by FluxBB