本帖最后由 434939575 于 2022-12-24 23:07 编辑
 - (vl-load-com)
- (defun c:tt (/);;一键合并文件夹下LISP,并出FAS</span></h1>
- (setq write
- (open "c:\\220\\220.lsp" "w") ;目标文件
- )
- (setq file:dir:s (VL-DIRECTORY-FILES "c:\\110\" "*.lsp" 1)) ;源文件
- (foreach nn
- file:dir:s
- (setq fil_pat (strcat "c:\\110\" nn))
- (setq op (open fil_pat "r"))
- (while (setq line (read-line op))
- (write-line line write)
- ;;关闭文件
- ) ;while
- ;;;------------------
- (close op)
- ) ;foreach
- (close write)
- (vlisp-compile 'st "c:/220/220.lsp" "c:/220/220.fas")
- )
|