AppleScript名:指定フォルダをtarでまとめる |
set a to choose folder set b to tarFolder(a) of me –指定フォルダをtarでまとめる on tarFolder(a) set anAlias to a as alias tell application "Finder" set aParent to parent of anAlias set aFolName 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 cvf " & quoted form of (aFolName & ".tar") & " " & quoted form of (aFolName & "/") try set aRes to do shell script (preCMD & " && " & tarCMD) on error return false end try tell application "Finder" set tarAlias to ((aParent as string) & aFolName & ".tar") as alias set tarEx to exists of tarAlias end tell if tarEx = true then return tarAlias else return false end if end tarFolder |
More from my site
(Visited 40 times, 1 visits today)