
Originally Posted by
somethingkindawierd
I am trying to write a simple AppleScript line that will make a new folder in the folder of the current selection. The code to make a new folder causes PathFinder to quit. Any ideas on how to get PathFinder to make a new folder via AppleScript?
Here's a workaround, using the shell to create the folder:
Code:
tell application "Path Finder"
set foldername to "untitled"
set selected_items to selection
repeat with one_item in selected_items
tell me to set posix_path to POSIX path of one_item
set k to kind of one_item
if k = "Folder" then
set cmd to "mkdir " & quoted form of (posix_path & "/" & foldername)
do shell script cmd
end if
end repeat
end tell