Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to remove an existing directory programatically?
Message
From
16/10/2002 09:33:05
 
 
To
15/10/2002 22:22:52
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00711569
Message ID:
00711663
Views:
17
Hi Henry.

I am attempting to first, delete an existing directory and all subfolders within that directory and then create a new directory with subdirectories where needed.

This is a piece of cake using the Windows Script Host:
oFSO = CreateObject( ‘Scripting.FileSystemObject’ )
oFSO.DeleteFolder( ‘MyFolder2Delete’, .T. )
The second parameter tells the Windows Script Host to delete folders with the read-only attribute set. But do be careful when you use this method! The folders and files are deleted without being sent to the recycle bin, so once deleted they are gone forever.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform