Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursive Remove Directory
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00302015
Message ID:
00302094
Views:
30
>Hi Ed,
>
>As long as your deleting all the sub-directories, why not just:
>
>
FUNCTION DelFolderTree
>LPARAMETER cPathToDelete, toFSO
>LOCAL oFSO, oFolder
>IF TYPE('toFSO') # 'O' OR ISNULL(toFSO)
>   oFSO = CREATEOBJ('Scripting.FileSystemObject')
>ELSE
>   oFSO = toFSO
>ENDIF
>oFSO.DeleteFolder(cPathToDelete,.t.)
>oFSO = ''
>RETURN
You're right - as of the VBSCRIPT 5.0 update, it does a recursive delete! Thanks, Ken!
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