I am trying to use a VBScript to delete a folder that is zipped. The zip file has other folders and files as well.
Edit begin: the base code is from: How to delete files from zip with VBScript end edit
Here is a localized sample of the script I tried deleting it with:
zipfile = "D:\testFolder\zippers\TestIt\New folder\your.zip"
foldername = "New folder"
destination = "D:\testFolder\zippers\TestIt\New folder"
Set app = CreateObject("Shell.Application")
For Each f In app.NameSpace(zipfile).Items
If f.Name = foldername Then
app.Namespace(destination).MoveHere f, FOF_NOCONFIRMATION
End If
Next
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFolder fso.BuildPath(destination, foldername), True
Sadly, the folder in the ZIP remains. So the MoveHere seems like a CopyHere instead... weird
Can Anybody help? PS: there is no delete-folder tag, just a delete-file one...