ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

Drop file to rename it according to list of names

<< < (4/4)

Target:
this might be of interest...

http://www.ilovefreesoftware.com/05/tutorial/batch-rename-using-excel.html

kilele:
@Target thanks for the tip on how to rename files using Excel and Advancedrenamer.
I had new names on a column and descriptions on the other one (not the current files names).
In the end I used "Text 2 Folders" and den4b renamer

AbteriX:
Maybe this helps:


I have a folder with files and a spreadsheet with two columns with a list of names.
Current names on the left column (A), the new names on the right column (B).
Old name.txt   |   New wanted.txt
Alter Name.TXT   |   Neuer Name.TXT
Current name.txt   |   Target Name.txt



Use third column (C) and enter a formula in C1:

=" Ren " & """" & A1 & """  " & """" & B1 &""""

After pressing ENTER key you will get:

Old name.txt   |   New wanted.txt    |   Ren "Old name.txt"  "New wanted.txt"
Alter Name.TXT   |   Neuer Name.TXT   
Current name.txt   |   Target Name.txt   




Now select C1 and double click at the black square at the bottom right of that cell.
The formula is copied down.

Awaited Result:

Old name.txt   |   New wanted.txt    |   Ren "Old name.txt"  "New wanted.txt"
Alter Name.TXT   |   Neuer Name.TXT    |   Ren "Alter Name.TXT"  "Neuer Name.TXT"
Current name.txt   |   Target Name.txt    |   Ren "Current name.txt"  "Target Name.txt"




At last, select whole C-column, paste to a New Textfile.txt.
Open that file (add '@ECHO OFF' as new first line) and see if all went fine.
Change extension to .CMD and run on a copy of your real files (or have a backup).

DOS command REN will try to find file with name on the left, and if found, rename with name on the right.



---------------------------------------RenameBatch.CMD
@ECHO OFF

Ren "Old name.txt"  "New wanted.txt"
Ren "Alter Name.TXT"  "Neuer Name.TXT"
Ren "Current name.txt"  "Target Name.txt"

PAUSE
---------------------------------------



 

kilele:
@AbteriX
Very useful! though, as I said above, I was not given two columns with old names sided with new names, just new names with a brief description.
I solved the task as explained above with manual drag&drop :D

Navigation

[0] Message Index

[*] Previous page

Go to full version