Module: Reorg / Cleanup
This commit is contained in:
23
archive/Modules/ArchiveFolder.vbs
Normal file
23
archive/Modules/ArchiveFolder.vbs
Normal file
@@ -0,0 +1,23 @@
|
||||
ArchiveFolder "foo.zip", "Testordner"
|
||||
|
||||
Sub ArchiveFolder (zipFile, sFolder)
|
||||
|
||||
With CreateObject("Scripting.FileSystemObject")
|
||||
zipFile = .GetAbsolutePathName(zipFile)
|
||||
sFolder = .GetAbsolutePathName(sFolder)
|
||||
|
||||
With .CreateTextFile(zipFile, True)
|
||||
.Write Chr(80) & Chr(75) & Chr(5) & Chr(6) & String(18, chr(0))
|
||||
End With
|
||||
End With
|
||||
|
||||
With CreateObject("Shell.Application")
|
||||
.NameSpace(zipFile).CopyHere .NameSpace(sFolder).Items
|
||||
|
||||
Do Until .NameSpace(zipFile).Items.Count = _
|
||||
.NameSpace(sFolder).Items.Count
|
||||
WScript.Sleep 1000
|
||||
Loop
|
||||
End With
|
||||
|
||||
End Sub
|
||||
Reference in New Issue
Block a user