AutoCAD 2013/2014/2015

Reply
*Expert Elite*
Patchy
Posts: 6,208
Registered: ‎09-16-2009
Message 1 of 10 (558 Views)
Accepted Solution

Rename a file

558 Views, 9 Replies
08-14-2013 07:07 AM

Hi all,

Does anyone know if there is a program that can rename a new file to match another file name (They are in 2 different folders)

 

What I have is hundreds of PDF files and I have to rename each of them to match the name of an existing file in another folder. Retyping the names is killing me. I hope to find a program to click on one to match another.

 

Any suggestion that can help would be good.

 

Thanks

 

 

Valued Mentor
AcadAdamLT
Posts: 492
Registered: ‎12-14-2010
Message 2 of 10 (549 Views)

Re: Rename a file

08-14-2013 07:18 AM in reply to: Patchy

Don't know of such a program, heres a fast way of doing it tho!

 

Open both file locations and place the windows bordering to each other.

Click the old file that you want to copy the name of, click the following keys:

f2, ctrl-C.

Click the new file that you want to rename:

f2, ctrl-V.

Easy and fast.

 

(f2 standard windows shortcutkey for renaming)

Signature, sincerely... //Adam
AutoCad LT 2014
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
*Expert Elite*
rkmcswain
Posts: 3,081
Registered: ‎11-13-2006
Message 3 of 10 (542 Views)

Re: Rename a file

08-14-2013 07:23 AM in reply to: Patchy

So you have files like "PDF1.pdf", "PDF2.pdf", "PDF3.pdf", and you want to rename those to something like "MyNewFile1.pdf", "MyNewFile2.pdf", "MyNewFile3.pdf", etc...?

 

If so, then Irfanview will do it.

 

 

*Expert Elite*
Patchy
Posts: 6,208
Registered: ‎09-16-2009
Message 4 of 10 (537 Views)

Re: Rename a file

08-14-2013 07:27 AM in reply to: rkmcswain

They have radom names and I have the RENAMER program so it doesn't work that good.

I have been doing the method that Adam's suggested, painfull.

*Expert Elite*
Patchy
Posts: 6,208
Registered: ‎09-16-2009
Message 5 of 10 (528 Views)

Re: Rename a file

08-14-2013 07:44 AM in reply to: AcadAdamLT

Thank you for your suggestion.

(I had been renaming them your way,  I'm hoping for a lazier way :smileyvery-happy:)

*Expert Elite*
3wood
Posts: 968
Registered: ‎03-25-2009
Message 6 of 10 (508 Views)

Re: Rename a file

08-14-2013 11:05 AM in reply to: Patchy

When switching between Windows, use Alt+Tab to save you mouse moving time. Also, use Arrow key to move down to next file instead of using mouse.

 

The other way is using a routine to do it. You need create two csv files as the filename list of each folders (either by lisp or Windows DIR command, then copy one list into another as the second column in Excel. Save new file as a combined csv file. Create a routine to read this csv file, repeat each line, read the first file name and locate the second file based on the second filename and then rename it.

 

If the folder contains thousand of files, or it is a routine task, it is worth to create such lisp routine.

There is some programs avaiable to mimic keyboard/mouse movment, if the editing procedure is fixed, you can try such program as well.

*Expert Elite*
Patchy
Posts: 6,208
Registered: ‎09-16-2009
Message 7 of 10 (491 Views)

Re: Rename a file

08-14-2013 12:45 PM in reply to: 3wood

Good tip on that Alt+Tab

 

 

 

Mentor
PatrickByrne
Posts: 164
Registered: ‎10-06-2010
Message 8 of 10 (474 Views)

Re: Rename Multiple files

08-14-2013 08:42 PM in reply to: Patchy

Following on from 3wood, I have done this before using the DOS Rename command and Excel to create a .bat file.

1st Stage: You need to get a list of the drawings that you want to rename, the easiest way is to open Notepad and add this line DIR *.DWG /B > DWGlist.csv save this file as DRG_LIST.BAT. Copy to the folder containing the drawings you want to rename and in Windows Explorer double click on the file DRG_LIST.BAT, this will create a file DWGlist.csv, double click on this file and it will open in Excel. You can also use the DOS prompt to run the DIR command.

2nd Stage: In Excel you now have a row containing the existing drawing files names. In the second row add the row of names you want these drawings to be renamed too. In the third row use the formula  ="RENAME " & CHAR(34) & A1 & CHAR(34) & " " & CHAR(34) &  B1 & CHAR(34) and drag down into the other cells. See attached example Excel file. The part CHAR(34) adds a semicolon into the formula allowing you to rename files with a space in the name.

3rd Stage: Open Notepad and Copy/Paste the third row into it, Next save this file as DRG_LIST_Rename.BAT and in Windows Explorer copy it to the folder containing the set of drawings you want to rename, double click on this file and it will quickly rename all the files for you.

 

I would advise you to back up the files into another folder before you start.

 

Patrick
http://www.multi-batch.com/ 
For your entire batch processing needs

*Expert Elite*
Patchy
Posts: 6,208
Registered: ‎09-16-2009
Message 9 of 10 (431 Views)

Re: Rename Multiple files

08-15-2013 06:10 AM in reply to: PatrickByrne

Use old DOS, that's it.

 

Mentor
PatrickByrne
Posts: 164
Registered: ‎10-06-2010
Message 10 of 10 (392 Views)

Re: Rename Multiple files

08-18-2013 09:52 PM in reply to: Patchy

The trick is to put the DOS commands in a Bat file and run them through Windows Explorer. This saves you having to open the DOS Command Prompt and navigate through the folders using the CD (Change Directory) command.

 

Excel can also be used for writing scripts. For example if you have a lot of drawings and you need to fill in the title block you can set it up in Excel to open the drawing and fill in the Title Block.

 

Patrick
http://www.multi-batch.com/
For your entire batch processing needs

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube