home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
b
/
butl.zip
/
BATMAKR1.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-03-01
|
1KB
|
36 lines
100 'BATMAKR1.BAS -- by Paul Somerson
110 ' (c) 1987 Ziff Communications Co.
120 'This creates easy subdirectory switcher files
130 'Before you use this, get into DOS and type:
140 '
150 ' CHKDSK / V | FIND "Dir" > TEMPFILE
160 '
170 'For this to work properly, make sure each
180 ' subdirectory has its own unique name.
190 'To switch between subdirectories in DOS, type
200 ' name of the subdirectory WITHOUT the CD\
210 ' prefix, and WITHOUT the long PATHname
220 ' that usually precedes it.
230 'For instance, to switch to \DOS\BIN, just
240 ' type: BIN
250 ON ERROR GOTO 440
260 '
270 ' --- read raw file, truncate left end of each line ---
280 '
290 OPEN "tempfile" FOR INPUT AS #1
300 IF EOF(1) THEN 430 ELSE LINE INPUT #1,A$
310 A$=RIGHT$(A$,LEN(A$)-12):IF A$="\" THEN 300
320 FOR A=LEN(A$) TO 1 STEP -1
330 IF MID$(A$,A,1)<>"\" THEN 350
340 NM$=RIGHT$(A$,LEN(A$)-A)+".BAT":GOTO 390
350 NEXT
360 '
370 ' --- start churning out the batch files ---
380 '
390 PRINT "Creating ";NM$;" batch file..."
400 OPEN NM$ FOR OUTPUT AS #2
410 PRINT #2,"CD"+A$;:CLOSE #2
420 GOTO 300
430 CLOSE:KILL "tempfile.":PRINT:LIST 170-240:END
440 IF ERR=53 THEN LIST 130-160 ELSE ON ERROR GOTO 0