Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursive Remove Directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00302015
Message ID:
00302094
Vues:
29
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform