End If \r
End Sub\r
\r
+Function Strip(Str)
+ Set oRE = New Regexp
+ oRE.Pattern = "[\W_]"
+ oRE.Global = True
+ Strip=oRE.Replace(Str, "")
+End Function
+
Sub UnCompress(Archive, DestFolder)\r
- batname = "tmp" & CStr(Int(10000*Rnd)) & ".bat"\r
- wscript.echo("Extracting: " & Archive)\r
+ batname = "tmp" & Strip(Archive) & CStr(Int(10000*Rnd)) & ".bat"
+ wscript.echo("Extracting: " & Archive & " - using: " & batname)
Set MyFile = fso.CreateTextFile(UtilsDir & batname, True)\r
MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote )\r
MyFile.Close\r