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:
00776816
Views:
27
Mark,

Thanks for the snippet.
Which O/S * does * it work on successfully?

>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
>
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform