This code deletes folders and files. the only thing you have to do is to provide the program a path
This code deletes folders and files. the only thing you have to do is to provide the program a path to that file or folder and to tell him if
Rate This code deletes folders and files. the only thing you have to do is to provide the program a path
(1(1 Vote))
'This module is brought to you by Barabas Andrei
'It is freeware, but you'll have to use it with
'this header.
'How it works:
'It deletes files and folders. You just have to provide a
'path and to tell the module if the path points to a folder
'or to a file
'Ex: Delete("c:\windows",1) {deletes the folder(the number 1
'represents the folder)}
'Ex: Delete("c:\windows\setup.bmp",0) {deletes the file(the number
'0 stands for file
'Please enjoy
'if you have any trouble with this module please e-mail me
Public Function Delete(ByVal path As String, ByVal Mode As Integer)
If Mode = 0 Then
Set fs = CreateObject("Scripting.FileSystemObject")
fs.deletefile path
ElseIf Mode = 1 Then
Set fs = CreateObject("Scripting.FileSystemObject")
fs.deletefolder path
End If
End Function
This code deletes folders and files. the only thing you have to do is to provide the program a path Comments
No comments yet — be the first to post one!
Post a Comment