Now we will extract the contents of documents.tgz file to separate /tmp/tgz/ directory. Return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '') Īrr. First make sure that you create the specific directory that you want to extract into by using: mkdir -p /tmp/tgz. Var _dir_ = FSO.GetParentFolderName(_file_) 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. Certain rules govern that process of course - the uid and gid of the owner will only be retained if root is doing the untaring, but otherwise, they are set to the efective uid and gid of the current process. 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. When you untar that tar file, the permissions are attempted to be retained. 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. The open source freeware keeps all features of 7-Zip and adds a few useful features that makes the software more user-friendly. The Easy 7-Zip is an easy-to-use version of 7-Zip. to locate a file in a Linux system, just like the search command in Windows. To open/extract TAR file on Windows, you can use 7-Zip, Easy 7-Zip, PeaZip, and so on. You're using Windows XP, so you should have Windows Scripting Host installed by default. Learn basic commands for Linux, a free and open-source operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |