#"shell" from autolisp
2 messages in this thread
Good day. My name is Bill Mida from TCBC in Ann Arbor. I'm wondering ho to
rename drawing files from within an AutoLisp program. The major problem that
I don't know the names of the files I want to rename until I run my pprogram.
First, I prompt the user for the file to rename and then I prompt for the new
name (actually tool number and position ). I have to do this with both text
files and .dwg files. I have no problem reading and writing the text files
but that doesn't work with .dwg files. What II'm trying to do is create a
batch file while inside my AutoLisp program which contains the rename command
and the names of the drawing files. I then try to execute that batch file
with a line in my program as follows; (command "shell" "" "run"). This will
take me out to dos but it doesn't eexecute my batch file and it leaves me out
in dos. So, how can I rename drawing files out in dos from within a lisp
program. Please HELP Thank You Very Much. Bill Mida P.S. My run.bat
file looks like this; ren _et104.dwg et102.dwg ; How can I run this from
AutoLisp.
Bill —
Use AutoLISP to build an AutoCAD script file. Unlike an AutoLISP
program, a script file can be used to feed input to the AutoCAD File
Utility Menu, which can be used to rename existing files.
Look up the FILES command in the AutoCAD Reference Manual. I hope
this helps.
— Brad
..