Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting folders?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00638521
Message ID:
00638971
Views:
33
>>>Yeah, that´s right... I´m triying to kill IE Temp files... ok, thanks for help an time guys...
>>
>>It's fairly easy to iterate through the folders files collection, and use the file's delete method. You could, of course, use ADIR() to do the same thing.
>
>This is actually a job for SHFileOperation - it can delete file content, recursively if desired, and can be set to continue executing a delete operation even if it is prevented from completing referenced files; it returns a bit indicating that specific requests were refused, and it's possible to retrieve a list of the items that failed to do as told. Implementing this for myself took a fair amount of tedious coding, but it is doable using only native VFP code and some API calls. - set up SHFileOperation to perform the delete as desired - you can specify multiple templates for the deletion, prevent Windows from requesting confirmation of deletions, allow or disallow recursion, disable the error UI and a few other tricks - check SHLOBJ.H and SHELLAPI.H for the flags and functions.

Ed,

You know, some people don’t like to or shouldn’t be allowed to play with sharp objects because they might hurt themselves. In Windows, this means pointers < vbg >. What about getting an object reference to the bit bucket via the Shell.Application’s NameSpace method, and simply moving the files there with the MoveHere method? Or am I missing something?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform