tutarent.blogg.se

How to unzip files on windows 8
How to unzip files on windows 8






how to unzip files on windows 8

I tested it with a directory containing multiple nested files and folders and it worked perfectly. Here is a great link that shows how to zip a file using windows native commands. Since windows has had the 'send to' option to create a zip file, I knew there had to be a way to do it via command line and I found some options. vbs, or some other type of script within the command line. However, the mantra is, if it can be done natively via the GUI then there is likely a way to do it via batch. And the extract.exe command extracts those files. It does make a zipped file of sorts but it is really more similar to files from a windows setup disk (has the underscore as the last character of the file extension or name). It isn't natively on most windows machines and is part of the 2003 resource kit. I also found compress.exe which I did happen to have on my computer. The compressed files are still accessible but are just compressed to create space on a drive that is low on space. You get the option to do cleanup (remove temp files, etc) as well as compress files.

how to unzip files on windows 8

It is similar to the option you get when right clicking on a drive letter or partition in Windows. I found the compact.exe program compresses files but not to create a highly compressed file (or set of files). I've been looking to answer this exact question and from my research, DiryBoy's response seems to be accurate. Just set SOURCEDIR and OUTPUTZIP.įilename: ZipUp.bat echo Set fso = CreateObject("Scripting.FileSystemObject") > _zipup.vbsĮcho InputFolder = fso.GetAbsolutePathName((0)) > _zipup.vbsĮcho ZipFile = fso.GetAbsolutePathName((1)) > _zipup.vbsĮcho CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "PK" ^& Chr(5) ^& Chr(6) ^& String(18, vbNullChar) > _zipup.vbsĮcho Set objShell = CreateObject("Shell.Application") > _zipup.vbsĮcho Set source = objShell.NameSpace(InputFolder).Items > _zipup.vbsĮcho objShell.NameSpace(ZipFile).CopyHere(source) > _zipup.vbsĮcho ' Keep script waiting until compression is doneĮcho Do Until objShell.NameSpace( ZipFile ).Items.Count = objShell.NameSpace( InputFolder ).Items.Count > _zipup.vbsĬScript _zipup.vbs %SOURCEDIR% %OUTPUTZIP%Īlternatively, you can parametrize this file by replacing the line CScript _zipup.vbs %SOURCEDIR% %OUTPUTZIP% with CScript _zipup.vbs %1 %2, in which case it can be even more easily called from by simply calling CALL ZipUp C:\Source\Dir C:\Archive.zip. There isn't any need for any third-party tools or dependencies. You can use a VBScript script wrapped in a BAT file.








How to unzip files on windows 8