Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting all files in a directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00776809
Message ID:
00776813
Vues:
13
I do not know about all OSes, but here is a proc I use to clear file attributes:
PROCEDURE ClearAttributes
   *
   LPARAMETER tcFileName
   IF VARTYPE(tcFileName) <> "C" OR EMPTY(tcFileName)
      RETURN .F.
   ENDIF
   LOCAL lcFile, lnRetVal
   lcFile = ALLTRIM(tcFileName)
   DECLARE SHORT SetFileAttributes IN KERNEL32 ;
      STRING @ lpFileName, ;
      INTEGER dwAttributes
   lnRetVal = SetFileAttributes(lcFile, 0) && Remove all attributes
   RETURN (lnRetVal > 0)
ENDPROC
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform