home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 13
/
CD_ASCQ_13_0494.iso
/
maj
/
419
/
setlabel.bas
< prev
next >
Wrap
BASIC Source File
|
1994-03-13
|
1KB
|
41 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1994 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE FUNCTION GetDrive$ ()
DECLARE SUB GetSub1 (Drive$, SubDir$, SubDirLen%, ErrCode%)
DECLARE SUB SetSub (Subdir$, ErrCode%)
DECLARE SUB SetLabel00 (Drive$, Label$, ErrCode%)
DECLARE SUB SetLabel01 (Drive$, ErrCode%)
SUB SetLabel (Drive$, Label$, ErrCode%)
IF INSTR(Label$, "?") OR INSTR(Label$, "*") THEN
ErrCode% = -1
ELSE
IF LEN(Drive$) THEN
D$ = Drive$
ELSE
D$ = GetDrive$
END IF
CurSub$ = SPACE$(80)
GetSub1 D$, CurSub$, CurSubLen%, ErrCode%
IF ErrCode% = 0 THEN
CurSub$ = LEFT$(CurSub$, CurSubLen%)
SetSub D$ + ":\", ErrCode%
IF ErrCode% = 0 THEN
IF LEN(Label$) THEN
Lab$ = LEFT$(Label$ + SPACE$(11), 11)
SetLabel00 D$, Lab$, ErrCode%
ELSE
SetLabel01 D$, ErrCode%
END IF
SetSub D$ + ":" + CurSub$, ErrC%
ErrCode% = ErrCode% OR ErrC%
END IF
END IF
END IF
END SUB