This I hope is a simple one liner.
I Just need to adjust this line
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Desktop"}
end tell
so that rather than look at the desktop I need it to look in an external Volume,
Scratches:Workings
Here is the whole script as this recreates a plist on boot.
tell application "System Events"
set myname to (name of current user)
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.1_imageHotFolderEAN.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.1_imageHotFolderEAN"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/1_EAN2SKU.scpt"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Desktop/HotFolder"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.0_HeliconHotFolder.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.0_HeliconHotFolder"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/0_HeliconHotFolder.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Pictures/HELICON/"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.2_imageHotSorted2Destination.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.2_imageHotSorted2Destination"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/2_HotSorted2Destination.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Desktop/HotFolder"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.3_imageSortByNumberOfLayers.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.3_imageSortByNumberOfLayers"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/3_SortByNumberOfLayers.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Pictures/HotDestination"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.4a_imageHotFolder2do.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.4a_imageHotFolder2do"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/4A_FileSorterHotFolder2Do.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Pictures/HotFolder2do"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.4b_imageHotFolderDone.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.4b_imageHotFolderDone"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/4B_FileSorterHotFolderDone.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Pictures/HotFolderDone"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.4b_imageHotFolderDone.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.4b_imageHotFolderDone"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/4B_FileSorterHotFolderDone.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Pictures/HotFolderDone"}
end tell
end tell
end tell
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set the plistfile_path to "~/Library/LaunchAgents/user.watchfolder.5_imageLabel.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
-- add new property list items of each of the supported types
tell this_plistfile
make new property list item at end with properties ¬
{kind:string, name:"Label", value:"user.watchfolder.5_imageLabel"}
set f to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"ProgramArguments"}
tell f
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"osascript"}
make new property list item at end with properties ¬
{kind:boolean, name:"item 1", value:"/Users/" & myname & "/WorkFlow/Folder Actions/5_LabelFilesByRatioGroup.scpt/"}
end tell
set w to make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:list, name:"WatchPaths"}
tell w
make new property list item at end with properties ¬
{kind:boolean, name:"item 0", value:"/Users/" & myname & "/Desktop"}
end tell
end tell
end tell