dos rename

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
adk
Posts: 1
Joined: 03 Jun 2010 06:29

dos rename

#1 Post by adk » 03 Jun 2010 06:38

Hi all
I need to rename a number of files. I have a list in excel with the old file name and in the next colomn the new file name.

The rename command is: =CONCATENATE("rename ",I2," """,J2,"""") ...... I2 = 01 HCK01.tif and J2 = Vol 1.tif

When I copy and paste this command into Dos into the correct folder and drive, it says "The syntax of the command is incorrect."

Is this becasue it has a leading '01' at the beginning of the file name? Are there any ways around this?

Please any help would be greatly appreciated..

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: dos rename

#2 Post by aGerman » 03 Jun 2010 08:37

adk

This should be your Excel formula:
=CONCATENATE("rename ","""",I2,""" """,J2,"""")

The result of this formula (into your excel sheet) should be:
rename "01 HCK01.tif" "Vol 1.tif"

This result you can copy/paste into your batch file.

Regards
aGerman

Post Reply