The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
So, bit of a problem. I need to rename about 3500 .DWG files according to a number in the drawing. DWG files. We have a nice batch renaming program, but it only works for .tiffs. What I was thinking of doing was printing out a list of the original filenames, going through the files in autocad, writing down the new names, and then going through them all afterwards.
Is there an easier way? Some sort of renaming program I could write or something? I know there's one we have floating around that changes the extensions of a batch of files at once, but I'm not sure how, or if I even could, adapt that to change the filenames themselves. What I'm thinking of is something that would let me type out the new names in sequential order to go with the old ones. Is it possible?
I don't know anything about DWG files in particular, but if the file viewer lets you save, I'd open each one, do a Save As, save it with the number as the file name, and afterwards go to the command prompt and do something like "ren *.* *.dwg" to append the appropriate extension, if necessary (probably not, but depends on the file viewer).
This is assuming that you don't have a better way to get the numbers than opening and viewing each file, though. If you have a list correlating the current file names to the new numbers, then you could use Excel to create a batch file all easy-like.
===
I reread the OP, and realized that you might not know how to change the extensions of files from the command prompt. Hrm.
Do you know how to open a command prompt and get to the folder in question? Do you have "Command Prompt Here" installed? If so, open the folder with the files in Windows Explorer, right click in the upper left corner and choose "Open Command Window Here".
Then you can rename your files to TIFFs by typing "ren *.dwg *.tiff". Run your renaming program, then type "ren *.tiff *.dwg" to change them back.
I don't know anything about DWG files in particular, but if the file viewer lets you save, I'd open each one, do a Save As, save it with the number as the file name, and afterwards go to the command prompt and do something like "ren *.* *.dwg" to append the appropriate extension, if necessary (probably not, but depends on the file viewer).
This is assuming that you don't have a better way to get the numbers than opening and viewing each file, though. If you have a list correlating the current file names to the new numbers, then you could use Excel to create a batch file all easy-like.
===
I reread the OP, and realized that you might not know how to change the extensions of files from the command prompt. Hrm.
Do you know how to open a command prompt and get to the folder in question? Do you have "Command Prompt Here" installed? If so, open the folder with the files in Windows Explorer, right click in the upper left corner and choose "Open Command Window Here".
Then you can rename your files to TIFFs by typing "ren *.dwg *.tiff". Run your renaming program, then type "ren *.tiff *.dwg" to change them back.
I can't just change the extensions. The files actually have to be converted using a program, I'm pretty sure.
Eh, extensions are just part of the file name. You can change a JPG to a DOC file easily enough, although it won't open properly of course. If necessary, go into Windows Explorer -> Tools -> Folder Options -> View and uncheck "Hide extensions for known file types" so that you can see the extensions in the file name.
If you can't rename them from the command prompt then the Excel-created batch file won't do anything. But it would be a lot faster than manually naming 3500 files. It depends on you already having a list of some kind, though, otherwise the time savings will probably be marginal.
Eh, extensions are just part of the file name. You can change a JPG to a DOC file easily enough, although it won't open properly of course. If necessary, go into Windows Explorer -> Tools -> Folder Options -> View and uncheck "Hide extensions for known file types" so that you can see the extensions in the file name.
If you can't rename them from the command prompt then the Excel-created batch file won't do anything. But it would be a lot faster than manually naming 3500 files. It depends on you already having a list of some kind, though, otherwise the time savings will probably be marginal.
I think we're discussing this on different levels here.
I realize that extensions are just part of the filename. What I'm saying is I couldn't open the renamed .dwg files in my batch image viewer.
Oh, your post said you had a batch file renamer. Is this the same as the viewer? I'm not 100% clear on what's needed here.
If your new file names are in sequential order and correspond to the existing order, then I'd do the following to create the batch file using Excel:
1. Go into the directory with all the files, in the command prompt.
2. Type DIR/B > LIST.TXT to create a text file with all the current file names.
3. Open this file in Excel (just drag it into an Excel window, so you don't have to futz around with unnecessary conversion details). Get rid of the LIST.TXT entry.
4. Add a column in front of the first one that has all the file names, and put REN in every cell in that column (until the last entry)
5. In the third column, put in your sequential list of numbers, without any extensions. You'll want to set the cell format to Special, and type in 0000, 00000 or whatever to fit the number of digits you're using (e.g., 0000 if you want 0000, 0001, 0002, 0003, etc.). Just type in the first cell and then use =C1+1 in the next one, and copy that formula down the column.
6. In the fourth column, put .DWG or whatever the target extension is.
7. In a different worksheet, type =CONCATENATE(A1, " ", B1, " ", TEXT(C1, "00000"), D1). Copy this formula down for however many entries you have.
8. Save this worksheet as a text file in the folder with all the files, then rename it whatever.bat, and run it.
You, uh, might want to try this with just two or three files at first to make sure I didn't mess it up somewhere along the line.
I have to rename lots and lots of files in my daily work, and I use ACDSee. It is a media organizing program, but it has no problem renaming any files. I use it to rename .flv flash video files. It can do find and replace, templates with numbers (clip#_400.flv turns into clip1_400.flv, clip2_400.flv, clip3_400.flv, etc.)
What Orogogus said will work. You could also write a batch or vbscript file to do it. If you're looking for something that will get a number out of the actual file (not the current filename), I doubt you'll find anything to do that.
Posts
This is assuming that you don't have a better way to get the numbers than opening and viewing each file, though. If you have a list correlating the current file names to the new numbers, then you could use Excel to create a batch file all easy-like.
===
I reread the OP, and realized that you might not know how to change the extensions of files from the command prompt. Hrm.
Do you know how to open a command prompt and get to the folder in question? Do you have "Command Prompt Here" installed? If so, open the folder with the files in Windows Explorer, right click in the upper left corner and choose "Open Command Window Here".
Then you can rename your files to TIFFs by typing "ren *.dwg *.tiff". Run your renaming program, then type "ren *.tiff *.dwg" to change them back.
I can't just change the extensions. The files actually have to be converted using a program, I'm pretty sure.
The excel batch file thing sounds good though.
If you can't rename them from the command prompt then the Excel-created batch file won't do anything. But it would be a lot faster than manually naming 3500 files. It depends on you already having a list of some kind, though, otherwise the time savings will probably be marginal.
I think we're discussing this on different levels here.
I realize that extensions are just part of the filename. What I'm saying is I couldn't open the renamed .dwg files in my batch image viewer.
If your new file names are in sequential order and correspond to the existing order, then I'd do the following to create the batch file using Excel:
1. Go into the directory with all the files, in the command prompt.
2. Type DIR/B > LIST.TXT to create a text file with all the current file names.
3. Open this file in Excel (just drag it into an Excel window, so you don't have to futz around with unnecessary conversion details). Get rid of the LIST.TXT entry.
4. Add a column in front of the first one that has all the file names, and put REN in every cell in that column (until the last entry)
5. In the third column, put in your sequential list of numbers, without any extensions. You'll want to set the cell format to Special, and type in 0000, 00000 or whatever to fit the number of digits you're using (e.g., 0000 if you want 0000, 0001, 0002, 0003, etc.). Just type in the first cell and then use =C1+1 in the next one, and copy that formula down the column.
6. In the fourth column, put .DWG or whatever the target extension is.
7. In a different worksheet, type =CONCATENATE(A1, " ", B1, " ", TEXT(C1, "00000"), D1). Copy this formula down for however many entries you have.
8. Save this worksheet as a text file in the folder with all the files, then rename it whatever.bat, and run it.
You, uh, might want to try this with just two or three files at first to make sure I didn't mess it up somewhere along the line.
It's basically going from a string of like 6-7 numbers/letters to a different string of like 6-7 numbers/letters with maybe a dash thrown in.
http://www.thelostworlds.net/
If they are Image files that need to be converted, this program is good at it:
http://www.irfanview.com/
No idea what a .DWG file is, but if it's an image format then more then likely irfranview can read (and convert) it.
EDIT:
Also autoit (or winscript) will automate GUI controls. Basically a scripting language for Windows elements.
Bulk Rename Utility
And Gihgehls is right, .dwg files are Autocad Drawings.
I don't believe it - I'm on my THIRD PS3, and my FIRST XBOX360. What the heck?