Jump to content

Batch file for changing file name


XCrossWindsX

Recommended Posts

Hello,

 

Autocad 2011. The company I am working for is changing its data base to a new format. The new format limits the file name length. I have dozens of dies containing a 1000 files each which are going to need to be renamed and replotted.

 

I have a batch file for renaming the system file names. I have a batch plot program for plotting the drawings after they have been renamed but i need a batch program for renaming the files.

 

The files are numbered for example 11-3333333-202222 on the drawings and I need to reduce the file's name size on all prints by (1) charachter. I found I can remove the 13th character in all the file names (as shown with the bolded 0) and will fix the problem.

 

Is there a way to create a batch file that will open a group of drawings. Edit the Titleblock (AMPFORMAT), change the TAGS (T4 & T42) which are the file names by deleting the 13th character in each name.

 

A batch program that can be modified to do it? A program I can purchase that will give me the capabilities?

 

Thanks

Link to comment
Share on other sites

I think what you want is a script, same as a batch but runs within Autocad theres lots of change attribute stuff here using tag name etc just search.

 

Heres a script example

open dwg1 (load "changetags") close Y
open dwg2 (load "changetags") close Y
open dwg3 (load "changetags") close Y

 

Just post again if stuck

 

ps use your batch rename files as a start just rename to .scr then use normal search replace or paste into excel and use copy to create extra stuff per line concactenante for new column then paste back into a scr file via notepad

Link to comment
Share on other sites

I'd tell the company it is not realistically possible to go back and rename/reprint all old jobs and will take you X hours to do and thus cost the company $Y.

Link to comment
Share on other sites

Dink The changing attributes is the easy bit if you know how but I would agree reprinting all drawings how many trees do you need to cut down to make paper, if a copy is required we are in the paperless world now (haha) as part of process create PDF's for record and print as required.

 

As for the time run over night no real cost.

 

Xwinds post a dwg with the title block mark the changes required.

Link to comment
Share on other sites

Thanks. I will give this all a look through on Monday when I return to work.

 

Unfortunately, corporate has put together a (super) team thats in charge and making all the decisions for the company worldwide on this changeover of the database. You know how that goes. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...