Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting all files in a directory
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00776809
Message ID:
00776813
Views:
14
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform