home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
DRIVETST.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
70 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME DRIVETST.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NB02.INC"
COLOR 7,0
CLS
? "┌─────────────────────────────────────────────────────────────────────────────
? "│ fIsDrive% ( Drive$ )
? "│ fDriveReady% ( Drive$ ) fChDir% ( Path$ )
? "│ fCurDir$ ( Drive$ ) fChDrive% ( Drive$ )
? "├─────────────────────────────────────────────────────────────────────────────
? "│ These functions all return information on the system's currently active
? "│ drive/path and/or allow you to make changes to it. Their use is quite
? "│ straight forward and easy. Some of them are parallel to PowerBASIC functions
? "│ and only remove the requirements of error trapping as a benefit.
? "│ REMINDER: I have never liked programs that didn't return my system to the
? "│ exact state it was in when I called the program so a quick call
? "│ to fCurDir$ will gather this info for your programs and allow
? "│ you to restore it before you exit.
? "├─────────────────────────────────────────────────────────────────────────────
? "│ fMKdir% ( Path$ ) and fRMdir% ( Path$ ) are also available but I will not
? "│ provide actual code as they work just like the DOS commands and if you wish
? "│ to see them in actions go for it.
? "└─────────────────────────────────────────────────────────────────────────────
?
OrigPath$ = fCurDir$( "" )
FOR Drives% = 65 TO 90
IF NOT fIsDrive%( CHR$(Drives%) ) THEN EXIT FOR
NEXT
DECR Drives%, 65
PRINT "Your computer's Drive:\Path\ is: "; OrigPath$
PRINT USING "There are # drives available."; Drives%
PRINT "Drive C is reporting that it is ";
IF NOT fDriveReady%( "C" ) THEN PRINT "NOT ";
PRINT "ready to go!
$if 0
fMkDir "PUREJUNK" ' make a new directory
fChDir "PUREJUNK" ' go to it
fChDir ".." ' go back 1 directory (where we were)
fRmDir "PUREJUNK" ' remove the new directory
$endif
BYEBYE:
fChDrive OrigPath$
fChDir MID$( OrigPath$, 3 )
END