Hey guys, Tiger just came in the mail yesterday, and I'm having a ball!
I'm trying to get an automator application ready for my mom which will download the pictures from her digital camera, move them to a specific dated folder, and scale them to 300 pixels. Here's what I've got so far:
What it basically does is create a folder in the pictures folder with todays month, then creates a folder inside that with the day of the month, then moves all the pictures in there. The only part I'm having trouble with is the last bit where it moves the files. (Fourth to last line.) When running the script, I get:
"Finder got an error: Can't set folder 'Macintosh HD:Users:Craig
ictures
ictures:July21' to every file of folder "Macintosh HD:Users:Craig
ictures:eBay Temp:".
Any ideas?
Code:
on run {input, parameters}
tell application "Finder"
set mydate to day of (current date) as string
set mymonth to month of (current date) as string
if exists folder "Macintosh HD:Users:Craig:Pictures:eBay Temp:" then
else
make new folder at "Macintosh HD:Users:Craig:Pictures:" with properties {name:"eBay Temp"}
end if
if exists folder "Macintosh HD:Users:Craig:Pictures:Pictures:" then
else
make new folder at "Macintosh HD:Users:Craig:Pictures:" with properties {name:"Pictures"}
end if
set unknownfolder to "Macintosh HD:Users:Craig:Pictures:Pictures:" & mymonth & ":"
try
alias unknownfolder
on error
try
make new folder at "Macintosh HD:Users:Craig:Pictures:Pictures:" with properties {name:"untitled1"}
set name of folder "Macintosh HD:Users:Craig:Pictures:Pictures:untitled1:" to mymonth
on error
end try
end try
set unknownfolder2 to "Macintosh HD:Users:Craig:Pictures:Pictures:" & mymonth & mydate & ":"
try
alias unknownfolder2
on error
try
make new folder at ("Macintosh HD:Users:Craig:Pictures:Pictures:" & mymonth) with properties {name:"untitled2"}
set nwpath to "Macintosh HD:Users:Craig:Pictures:Pictures:" & mymonth & ":"
set name of folder (nwpath & "untitled2:") to mydate
end try
end try
set mydate1 to day of (current date)
set mymonth1 to month of (current date)
set localFolder to "Macintosh HD:Users:Craig:Pictures:eBay Temp:"
set remoteFolder to ("Macintosh HD:Users:Craig:Pictures:Pictres:" & mymonth1 & mydate1)
move every file of folder localFolder to folder remoteFolder with replacing
end tell
return input
end run
"Finder got an error: Can't set folder 'Macintosh HD:Users:Craig
Any ideas?