DIRECTORIES 3/3

 BBS: Inland Empire Archive
Date: 02-26-93 (00:13)             Number: 180
From: ROB MCKEE                    Refer#: NONE
  To: OWEN GIBBINS                  Recvd: NO  
Subj: DIRECTORIES 3/3                Conf: (2) Quik_Bas
Hello Owen!
   You wrote to All:

 '<<< Continued from Previous Message

 FUNCTION GoodFileName$ (FilName$)
    FiName$ = LTRIM$(RTRIM$(FilName$))
    j% = INSTR(FiName$, " "): g% = j%
    DO WHILE INSTR(FiName$, " ")
        MID$(FiName$, j%, 1) = "."
        DO
            i% = INSTR(g% + 1, FiName$, " ")
            IF i% <> 0 THEN
                IF i% - 1 > g% THEN EXIT DO ELSE g% = i%
            ELSE
                EXIT DO
            END IF
        LOOP
        FiName$ = MID$(FiName$, 1, j%) + MID$(FiName$, g% + 1)
        j% = INSTR(FiName$, " "): g% = j%
    LOOP
    GoodFileName$ = UCASE$(FiName$)
 END FUNCTION

 SUB KillFile (FilName$, FilAttribute%, Result%)
    DIM reg AS RegTypeX
    IF FilAttribute% AND 16 THEN Result% = 2: EXIT SUB
    IF FilAttribute% AND 1 THEN Result% = 3: EXIT SUB
    FiName$ = GoodFileName$(FilName$) + CHR$(0)
    reg.ds = VARSEG(FiName$):
    reg.ds = VARSEG(FiName$):
    reg.dx = SADD(FiName$):
    reg.ax = DelFileInt21h
    CALL INTERRUPTX(&H21, reg, reg)
    Result% = reg.flag AND 1
 END SUB

 SUB SetFileAttribute (UsPath$, FilName$, FilAttribute%, Result%) STATIC
    DIM reg AS RegTypeX
    IF FilAttribute% AND 16 THEN Result% = 2: EXIT SUB
    reg.ax = &H4301:
    reg.cx = FilAttribute%
    FiName$ = GoodFileName$(UsPath$ + FilName$) + CHR$(0)
    reg.ds = VARSEG(FiName$):
    reg.ds = VARSEG(FiName$):
    reg.dx = SADD(FiName$):
    CALL INTERRUPTX(&H21, reg, reg)
    Result% = reg.flag AND 1
 END SUB

 '||| That's All folks!!!

     SysOp 1:125/411 PVT - Rob

--- timEd/B6
 * Origin: Flyer_Proof_Computer_Svs,Richmond_CA,MO,V32B (1:125/411)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET