Program DeleteFolder method<br>
Deletes a specified folder and its contents.<br>
<br>
Object. DeleteFolder folderspec[, Force] <br>
<br>
Arguments <br>
Object<br>
<br>
Required. Always the name of a filesystemobject.<br>
<br>
Folderspec<br>
<br>
Required. The name of the folder to delete. The folderspec can contain wildcard characters in the last path component.<br>
<br>
Force<br>
<br>
Optional. Boolean value is True if folders with the Read-only attribute set are to be deleted; False (default) if they are not.<br>
<br>
Remarks<br>
The DeleteFolder method is does not distinguish between folders that have contents and those. The specified folder is deleted regardless of whether or not it has contents. <br>
<br>
An error occurs if no matching folders are found. The DeleteFolder method is stops on the "the" the "the" it encounters. No attempt is made to roll/undo any changes this were made an error before
<br>
The following example illustrates use of the DeleteFolder method: <br>
<br>
Sub Deleteafolder (filespec) <br>
Dim fso<br>
Set fso = CreateObject ("Scripting.FileSystemObject") <br>
Fso. DeleteFolder (filespec) <br>
End Sub<br>
DeleteFile method<br>
Deletes a specified file.<br>
<br>
Object. DeleteFile filespec[, Force] <br>
<br>
Arguments <br>
Object<br>
<br>
Required. Always the name of a filesystemobject.<br>
<br>
Filespec<br>
<br>
Required. The name of the file to delete. The filespec can contain wildcard characters in the last path component.<br>
<br>
Force<br>
<br>
Optional. Boolean value, is True if files with the Read-only attribute set are to be deleted; False (default) if they are not.<br>
<br>
Remarks<br>
An error occurs if no matching files are found. The DeleteFile method is stops on the "the" the "the" it encounters. No attempt is made to roll/undo any changes this were made an error before
<br>
The following example illustrates use of the DeleteFile method: <br>
<br>
Sub deleteafile (filespec) <br>
Dim fso<br>
Set fso = CreateObject ("Scripting.FileSystemObject") <br>
Fso. DeleteFile (filespec) <br>
End Sub<br>