![]() The contents of the archive will be extracted to the same directory as. Return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '') Īrr. tar.gz file you want to extract and select 7-Zip > Extract Here. Var _dir_ = FSO.GetParentFolderName(_file_) How do I unzip files To select the zip file, you have two options: Click Select zip file to extract to open the file chooser Click Save on the individual. Var FSO = new ActiveXObject("Scripting.FileSystemObject") Var WSH = new ActiveXObject("WScript.Shell") So if 7z.exe is at C:\Windows\system32\7z.exe, you'd put: var SevenZipDir = "C:\\Windows\\system32" Īnyways, here's the script: /* vim:set offĬscript //nologo //e:jscript "%~dpn0.bat" %* (For instance, 7za.exe or 7z-real.exe) You can also set a default directory for the executable by changing SevenZipDir. If you want to change how it looks for stuff, you can change the SevenZipExe variable at the top of the script to whatever you want the executable name to be. if -DestinationPath is not given, it expands to the current directory. by default, Expand-Archive will create a parent folder to contain the archive. literal input path Expand-Archive -LiteralPath c:/Users/xah/xyz.zip. ![]() bat), and run: xtract.bat īy default, the script will check the folder of the script, as well as your system's PATH environment variable for 7z.exe. specify a output dir Expand-Archive -Path /xyz.zip -DestinationPath c:/Users/xah/out/. Just copy the code to a file name xtract.bat or something along those lines (Can be whatever as long as it has the extension. With that being said, here's a WSH JScript script to do what you need. You're using Windows XP, so you should have Windows Scripting Host installed by default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |