|
Answer» I'll try to be breif,
I have over 9,500 drawing files in about 30 folders which need to have a .dwf file published in association with them. The .dwf files are automatically generated when the drawing files are "checked" back into the "Vault". I have written a successful script file that runs when AutoCAD opens a drawing file which updates the drawing to allow the .dwf to get published when checked back in. (checking in will be done manually with other software, I'm good there).
My problem is with my batch file. I need to write a batch file (probably a single line) that will look in a specified FOLDER, open the first .dwg file that it finds into AutoCAD, run my successful script file after the drawing file is opened, (the script file affects, saves and closes the drawing), and then the batch needs to open the NEXT .dwg that it finds in the folder, and so on.
My batch file can't seem to do anything. (the screen "flashes", but nothing apparently happens). This is what I've written...
FOR %%f (D:\Designs\Drawings\A-B\*.dwg) DO START /WAIT Acad.exe "%%f" /b C:\Batch Files\DWF Update.scr
What I'm trying to say is:
For every file with the extension .dwg which resides in the folder D:\Designs\Drawings\A-B, open AutoCAD, and run the script file named DWF Update.scr which resides in the folder C:\Batch Files.
If any one can help identify what I'm MISSING here, it would be appreciated. I have virtually no experience with writing DOS batch files.
Thanks, Andy Code: [Select]FOR %%f in (D:\Designs\Drawings\A-B\*.dwg) DO START /WAIT Acad.exe "%%f" /b C:\Batch Files\DWF Update.scr
I know next to nothing about AutoCad, so I'll assume the Start command is correct.
Note: For long file names, the tokens= parameter may be needed. Let us know.
|