R14LISPɾһļ

R14LISPɾһļ˱̳ϣR14ЩаЩ֪أ  

dos

:

(defun del_file	(filename)
  (setq fn (open "tmp.bat" "w"))
  (write-line (strcat "del %1" ) fn)
  (close fn)
  (startapp "tmp.bat" filename)
)
(defun c:tt ()
  (del_file "c:\\1.txt")
)
 

ֱʹ (command "sh" "del c:\\1.txt") ԡ  


˺ö෽ɾûܰļɾȾҰ

AutoCAD 2004桡(command "DEL" "c:\\test.txt")û⣬R14ֹdelҲԣ2004ͬLISPȴɾļΪʲô˭ܽлл  


¥ϵ,ǲ2004pgpûж del ?
DEL, DEL, 0,File to delete: ,

for 200x
(vl-file-delete filename) 

Arguments 

filename 

A string containing the name of the file to be deleted. If you do not specify a full path name, vl-file-delete searches the AutoCAD startup directory. 

Return Values 

T if successful; nil if delete failed. 

Examples 

Delete newauto.bat: 

_$ (vl-file-delete "newauto.bat")
nil
Nothing was deleted because there is no newauto.bat file in the AutoCAD startup directory. 

Delete the newauto.bat file in the c:\ directory: 

_$ (vl-file-delete "c:/newauto.bat")
T
The  


try the following lines

(setq fname "E:\\TEST.DWG")
(setq cmd (strcat "DEL " fname))
(command "SHELL" cmd)  

R14(command "del" "ļ")ɾָļ
ļȲܳDOS涨8ַ  


Ŷֲãļ̫ˣллˣ  
