Thanks spinzr0, I am getting an error on line 9 char 9 error: bad file name or number code 800a0034
In the mean time I have made the this script work:
Dim strFilename, strPath
strFilename = "C:\foldersTest\Path.txt"
set objFSO = CreateObject("Scripting.Fi
if objFSO.FileExists(strFilen
set objFile = objFSO.GetFile(strFilename
Dim TextStream
Set TextStream = objFile.OpenAsTextStream(1
Dim Line,i
Do While Not TextStream.AtEndOfStream
strPath = trim(TextStream.readline)
DeleteFolder strPath
Loop
Set TextStream = nothing
Else
Msgbox "Input File not found"
End If
Msgbox "Done..!"
Function DeleteFolder(folderName)
If objFSO.FolderExists (folderName)Then
objFSO.DeleteFolder (folderName)
Else Exit Function
End If
End Function
Main Topics
Browse All Topics





by: spinzr0Posted on 2009-10-22 at 06:46:53ID: 25634092
Please give this a try
Select allOpen in new window