The Phone Losers Of England Presents: Last Updated 6th of January 2001
Back To Code Arena
REM Atributes Changer
REM Thomas Figg => theskung@hotmail.com
REM You may use this free of charge

REM File$ is the file
REM Attrib$ contains the attributes
REM M for modified
REM H for Hidden
REM R for read only
REM S for system
REM eg ATTRIB:("\blah.txt","RHM")

PROC Attrib:(file$,attrib$)
  LOCAL lc48z$(255),lc50z%,lc49z$(1),lc51z%
    lc48z$=file$
    IF LOC(UPPER$(attrib$),"R")=0
      lc50z%=lc50z%+1
    ENDIF
    IF LOC(UPPER$(attrib$),"H")
      lc50z%=lc50z%+2
    ENDIF
    IF LOC(UPPER$(attrib$),"M")
      lc50z%=lc50z%+32
    ENDIF
    IF LOC(UPPER$(attrib$),"S")
      lc50z%=lc50z%+4
    ENDIF
  lc51z%=CALL(2439,ADDR(lc48z$)+1,39,0,0,0)
  lc51z%=CALL(2439,ADDR(lc48z$)+1,lc50z%,0,0,255)
  IF lc51z%<0
    RAISE lc51z%
  ENDIF
ENDP
This Site Is © Copyright Project Atlantis, 2000-2001