如何使用这个AppleScript查看终端中的tar归档过程?

时间:2012-10-24 22:13:45

标签: tar

我在Finder中将此脚本作为应用程序运行,但我希望在存档完成时收到警报。知道我怎么能这样做吗?

    tell application "Finder"
set theItems to selection
repeat with _a from 1 to (count of theItems)
    set theItem to (item _a of theItems) as alias
    set itemPath to quoted form of POSIX path of theItem
    set fileName to name of theItem
    set theFolder to POSIX path of (container of theItem as alias)
    set zipFile to quoted form of (theFolder & fileName & ".tgz")
    do shell script "tar czvf " & zipFile & " " & itemPath
end repeat

告诉

非常感谢 埃里克

0 个答案:

没有答案