ziess
Registered
Hi.
I'd be the first to admit to being a novice programmer but i've decided to give the folder actions side of panther a go and hence need to learn a bit of AppleScript in the process.
For my first little project I decided i would write an action that moved downloaded mp3 files from my downloads folder to a folder within dowloads called Mp3 files. Simple.
Except i'm stuck.
I can get the Finder to create the Mp3s folder but I can't figure out how to move the files from downloads to mp3s.
Here's what i've got so far:
property done_foldername : "Mp3 Files"
property originals_foldername : "Downloads"
property type_list : {"MP3"}
property extension_list : {"mp3"}
on adding folder items to this_folder after receiving these_items
tell application "Finder"
if not (exists folder done_foldername of this_folder) then
make new folder at this_folder with properties {name:done_foldername}
end if
set the results_folder to (folder done_foldername of this_folder) as alias
if not (exists folder originals_foldername of this_folder) then
make new folder at this_folder with properties {name
riginals_foldername}
set current view of container window of this_folder to list view
end if
set the originals_folder to folder originals_foldername of this_folder
move these_items to done_foldername
end tell
end adding folder items to
Any help would be greatly appreciated!
I'd be the first to admit to being a novice programmer but i've decided to give the folder actions side of panther a go and hence need to learn a bit of AppleScript in the process.
For my first little project I decided i would write an action that moved downloaded mp3 files from my downloads folder to a folder within dowloads called Mp3 files. Simple.
Except i'm stuck.
I can get the Finder to create the Mp3s folder but I can't figure out how to move the files from downloads to mp3s.
Here's what i've got so far:
property done_foldername : "Mp3 Files"
property originals_foldername : "Downloads"
property type_list : {"MP3"}
property extension_list : {"mp3"}
on adding folder items to this_folder after receiving these_items
tell application "Finder"
if not (exists folder done_foldername of this_folder) then
make new folder at this_folder with properties {name:done_foldername}
end if
set the results_folder to (folder done_foldername of this_folder) as alias
if not (exists folder originals_foldername of this_folder) then
make new folder at this_folder with properties {name

set current view of container window of this_folder to list view
end if
set the originals_folder to folder originals_foldername of this_folder
move these_items to done_foldername
end tell
end adding folder items to
Any help would be greatly appreciated!