Having a problem creating folders inside the folder with action
This works
on adding folder items to this_folder after receiving added_items
set userFolder to ("" & (path to current user folder))
set inputFolder to ("" & userFolder & "testing")
set outputFolder to my checkFolderCreate(inputFolder, "output")
set joblogFolder to my checkFolderCreate(inputFolder, "JOBlogs")
set errorFolder to my checkFolderCreate(inputFolder, "ERRORED")
end adding folder items to
--see if a folder exists and if not create
on checkFolderCreate(thePath, theName)
set newPath to "" & thePath & ":" & theName
if (my itemExists(newPath)) is false then
tell application "Finder"
make new folder in alias ("" & thePath) with properties {name:theName}
end tell
end if
return newPath
end checkFolderCreate
-- check if an item exists
on itemExists(thePath)
try
tell application "Finder"
alias thePath
return true
end tell
on error errMsg
return false
end try
end itemExists
but this doesn’t
on adding folder items to this_folder after receiving added_items
set inputFolder to this_folder
set outputFolder to my checkFolderCreate(inputFolder, "output")
set joblogFolder to my checkFolderCreate(inputFolder, "JOBlogs")
set errorFolder to my checkFolderCreate(inputFolder, "ERRORED")
end adding folder items to
--see if a folder exists and if not create
on checkFolderCreate(thePath, theName)
set newPath to "" & thePath & ":" & theName
if (my itemExists(newPath)) is false then
tell application "Finder"
make new folder in alias ("" & thePath) with properties {name:theName}
end tell
end if
return newPath
end checkFolderCreate
-- check if an item exists
on itemExists(thePath)
try
tell application "Finder"
alias thePath
return true
end tell
on error errMsg
return false
end try
end itemExists
keep in mind they are the same folder !
any thoughts or direction are appreciated
mm