« [Apple] | トップページ | [copyItemAtPath]ファイルのコピー »

[createDirectoryAtPath]フォルダを作る

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions
property objMe : a reference to current application
property objNSString : a reference to objMe's NSString
set objFileManager to objMe's NSFileManager's defaultManager()



set strFolderPath to "/Users/Shared/Documents" as text
set ocidNSURLIsAliasFileKey to objMe's NSURLIsAliasFileKey
objFileManager's createDirectoryAtPath:(strFolderPath) withIntermediateDirectories:false attributes:(missing value) |error|:(reference)

|

« [Apple] | トップページ | [copyItemAtPath]ファイルのコピー »

AppleScript NSFileManager」カテゴリの記事