Skip to content

Instantly share code, notes, and snippets.

@tgck
Created March 22, 2013 17:23
Show Gist options
  • Save tgck/5223126 to your computer and use it in GitHub Desktop.
Save tgck/5223126 to your computer and use it in GitHub Desktop.
ごみ箱の中のファイル数をかぞえる. @AppleScript/MacOS X: 10.6.8/AppleScript Editor: 2.3
-- ゴミ箱のファイル数を取得する
set trashCount to do shell script "ls -1 ~/.Trash/ | wc -l | tr -d ' '"
--> "412" (文字列)
set trashCount to trashCount as integer
--> 412 (数値)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment