« [iPhone]バックアップの容量を調べる | トップページ | [Plist]mobileconfigはPropertyListです »

[サイズ]フォルダのサイズ

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

###
tell application "Finder"
    set aliasDesktopPath to path to desktop folder from user domain as alias
end tell
###
tell application "System Events"
    set numFolderSize to size of aliasDesktopPath as number
end tell
log (numFolderSize / 1024) / 1000 as integer




#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions


tell application "Finder"
    set aliasDesktopPath to path to desktop folder from user domain as alias
end tell

set strDesktopPath to POSIX path of aliasDesktopPath as text

set strCommandText to "/usr/bin/du -sh \"" & strDesktopPath & "\"" as text

set strResponse to do shell script strCommandText

set AppleScript's text item delimiters to "\t"
set listDelim to every text item of strResponse
set AppleScript's text item delimiters to ""
set strReturn to item 1 of listDelim as text

log strReturn

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions



###
tell application "Finder"
    set aliasDesktopPath to path to desktop folder from user domain as alias
end tell
###
tell application "Finder"
    set recordInfo to info for aliasDesktopPath
    set numFolderSize to size of recordInfo
end tell
log (numFolderSize / 1024) / 1000 as integer

|

« [iPhone]バックアップの容量を調べる | トップページ | [Plist]mobileconfigはPropertyListです »

AppleScript Folder」カテゴリの記事