[サイズ]フォルダのサイズ
#!/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
| 固定リンク
「Folder」カテゴリの記事
- [Folder]共有用のアイコン付きフォルダ作成(アクセス権別)(2025.02.20)
- [Localised] localized名称付きのフォルダを作成する(2025.02.20)
- [Folder]修正日がX日より古いフォルダのリスト(Spotlightの方が早いけど…苦笑)(2025.01.18)
- フォルダ内のファイルの情報をHTMLで出力する 少し修正(2024.10.17)
- フォルダ内のファイルを比較 差異があるファイルにはラベルを付与(2024.07.18)