一键合并文件夹下LISP,并出FAS
本帖最后由 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")
)
本帖最后由 434939575 于 2022-12-24 23:07 编辑
(defun c:tt (/);多文件分别输出fas
(setq file:dir:s (VL-DIRECTORY-FILES "c:\\110" "*.lsp" 1)) ;源文件
(foreach nn
file:dir:s
(setq fil_pat (strcat "c:\\110\\"nn))
(setq len (strlen nn))
(setq bb (substr nn 1 (- len 3) ))
(setq fil_b(strcat "c:\\110\\"bb "fas"))
(vlisp-compile 'st fil_pat fil_b) ;while
;;;------------------
) ;foreach
)
(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") ) 能不能整个多个fas打包vlx:lol 本帖最后由 434939575 于 2023-1-8 23:58 编辑
梦想家-DING 发表于 2022-12-20 13:45
能不能整个多个fas打包vlx
http://bbs.mjtd.com/forum.php?mo ... 82918&highlight=vlx这里有,不是我写的,大海大师的 by:tryhi
抱歉,本帖要求阅读权限高于 60 才能浏览,,方便发一下到邮箱吗,drb1619@163.com 谢谢楼主分享 我是菜鸟,这个代码好像不完整,我复制了用不了 434939575 发表于 2022-12-20 14:07
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=182918&highlight=vlx这里有
抱歉,本帖要求阅读权限高于 60 才能浏览,,方便发一下到邮箱吗,714651857@qq.com 434939575 发表于 2022-12-20 14:07
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=182918&highlight=vlx这里有
抱歉,本帖要求阅读权限高于 60 才能浏览,,方便发一下到邮箱吗,790350886@qq.com 中国梦 发表于 2022-12-20 20:37
谢谢楼主分享
能帮转发我一份吗?790350886@qq.com