
UNTAR TAR GZ ARCHIVE
Return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '') Īrr. if you want to extract an tar archive elsewhere just cd to the destination directory and untar it there: mkdir -p foo/bar cd foo/bar tar xzvf /tmp/ The command you've used would search the file foo/bar in the archive and extract it. Var _dir_ = FSO.GetParentFolderName(_file_) Fastest way to extract tar.gz Ask Question Asked 12 years, 1 month ago Modified 1 year ago Viewed 76k times 60 Is there anyway to extract a tar.gz file faster than tar -zxvf filenamehere We have large files, and trying to optimize the operation. Var FSO = new ActiveXObject("Scripting.FileSystemObject") Type tar -help for more information about tar. tar.gz file in one step by using tar command, as below. Var WSH = new ActiveXObject("WScript.Shell") Starting from Windows 10 build 17063, tar and curl are supported, therefore it is possible to unzip a. tar -tzvf /Users/tarek/ drwx- tarek/staff 0.

UNTAR TAR GZ ZIP FILE
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" %* zip: ZIP file (unpacking compressed files works only if the corresponding module is. z: tells tar to decompress the archive using g z ip. It tells tar the name and path of the compressed file. So the command does a couple things: f: this must be the last flag of the command, and the tar f ile must be immediately after. (For instance, 7za.exe or 7z-real.exe) You can also set a default directory for the executable by changing SevenZipDir. The gzip program applied compression, hence the gz extension. 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. 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.

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.
