« [コンソール]ストリームスタート | トップページ | フォルダ内に内包されているファイルのリスト »

マウントされているディスク

【スクリプトエディタで開く】

#!/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

set strFilePath to "/Volumes"

tell application "Finder"
  set aliasChkDirPath to POSIX file strFilePath as alias
  set listAliasContents to every disk of aliasChkDirPath
end tell

repeat with itemAliasContents in listAliasContents
  set aliasContents to itemAliasContents as alias
  tell application "Finder"
    log name of aliasContents as text
  end tell
end repeat


【スクリプトエディタで開く】

set strFilePath to "/Volumes"

tell application "Finder"
  set aliasChkDirPath to POSIX file strFilePath as alias
  set listAliasContents to every disk of aliasChkDirPath
end tell

repeat with itemAliasContents in listAliasContents
  set aliasContents to itemAliasContents as alias
  tell application "Finder"
    log POSIX path of aliasContents as text
  end tell
end repeat

|

« [コンソール]ストリームスタート | トップページ | フォルダ内に内包されているファイルのリスト »

Admin Volumes」カテゴリの記事