;;;Generates a directory and file listing for the specified drive-directory string. ;;;Note: drvdirstr must be in the form returned by (getvar"dwgprefix"). ;;;Creates DOSDIR.BAT to create DOSDIR.LST which is read to capture directories and ;;;filenames to write to dir_lst (was to file DIRS.LST) and to fil_lst ;;;(was to file FILES.LST) respectively. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 1/28/98 ;;;> EDITED: 05-20-2001 ;;; (DEFUN dirs (drvdirstr / ) (SETQ dir_lst NIL) (SETQ fil_lst NIL) (SETQ dosdirscr (OPEN (STRCAT drvdirstr "dosdir.bat") "w")) (WRITE-LINE (SUBSTR drvdirstr 1 2) dosdirscr) (WRITE-LINE (STRCAT "cd\\"(SUBSTR drvdirstr 4)) dosdirscr) (WRITE-LINE "dir *.* > dosdir.lst" dosdirscr) (WRITE-LINE "exit" dosdirscr) (CLOSE dosdirscr) (COMMAND ".sh" (STRCAT drvdirstr "dosdir.bat")) (WHILE (NOT;solves timing problem between file creation and availability for opening (SETQ infil (OPEN (STRCAT drvdirstr "dosdir.lst") "r")) ) ) ;;; (SETQ dirfil (OPEN (STRCAT drvdirstr "dirs.lst") "w")) ;;; (SETQ filfil (OPEN (STRCAT drvdirstr "files.lst") "w")) (WHILE (SETQ rdlin (READ-LINE infil)) (IF (NOT (EQ (SUBSTR rdlin 16 5) "