15-03-17, 01:06 AM
تفضل
Delete a folder and all its subfolders
Delete a folder and all its subfolders
كود :
' NOTE: this code requires that you add a reference to the
' Microsoft Scripting Runtime type library
' delete the C:\TEMP directory and all its sub-directories
Dim fso As New Scripting.FileSystemObject
fso.DeleteFolder "c:\temp"
'You can also pass a second argument and set it to True if you want to force the deletion of read-only files:
fso.DeleteFolder "c:\temp", True