Does anybody know of a way to rename the contents of a zip file when they're extracted?
I have a program which grabs zipped files from an outlook account, gives them a unique name, saves them to a network repository, then extracts the contents to a sub folder in that repository.
However, I need to be able to rename the excel files which reside in the zip file. Here's the code which reads the filename (source = a) and drops it on the network, then does an extraction via WinZip. Any ideas?
Source = a If InStr(1, Source, " ", vbTextCompare) <> 0 Then Source = Chr(34) & Source & Chr(34) Dest = "C:\OUTLOOKTEMP\unzipped\" If Dir(Dest, vbDirectory) = "" Then MkDir Dest If InStr(1, Dest, " ", vbTextCompare) <> 0 Then Dest = Chr(34) & Dest & Chr(34) ZipIt = Shell _ (WinZipPath & "Winzip32.exe -min -e " & Source & " " & Dest, vbNormalFocus)