AppleScript名:指定のtarアーカイブを展開する |
set a to choose file with prompt ".tarファイルを指定してください" set b to extractTar(a) of me –指定tarアーカイブを展開する on extractTar(a) set anAlias to a as alias tell application "Finder" set aParent to parent of anAlias set aFileName to name of anAlias end tell set aParent to aParent as alias set preCMD to "cd " & quoted form of POSIX path of aParent set tarCMD to "tar xf " & quoted form of (aFileName) try set aRes to do shell script (preCMD & " && " & tarCMD) on error return false end try set newName to text 1 thru -5 of aFileName –展開後の、".tar"を除去した名前 set extractFol to (aParent as string) & newName & ":" try return (extractFol as alias) on error return false end try end extractTar |
More from my site
(Visited 48 times, 1 visits today)