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:
00638550
Views:
27
>Hi Friends!
>
>I´m making a program that needs to clean the Internet Temporary Files and Cookies folder. I haven´t problems with the cookies folder but, how can I delete complete folders, the case of Internet Temporary Files? I mean, I don´t know the name of subfolders. I need something like DELTREE DOS command.
>
>Or, for example, a method to know the name of the subfolders to delete the files of each one.

You can use the API call SHFileOperation(), documented in the Win32 section here on UT, to do recursive deletion of folders; the WSH's Scripting.FileSystemObject also will allow you to delete non-empty folders with the right parameters. Both VFP's RD and the OS RD may not allow you to remove folders that contain either subfolders or files depending on your OS, and you're likely to have trouble with the process IAC where contained folders or files have the read-only, hidden or system attributes set.

Under NT-derived OS families, not all users have the necessary rights to delete files or folders from specific locations, even if they're on your local disk.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform