image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old February 16th, 2005, 08:48 PM
ziess's Avatar
Registered User
 
Join Date: Nov 2002
Posts: 234
Thanks: 0
Thanked 0 Times in 0 Posts
ziess is on a distinguished road
Any ideas for my AppleScript?

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 {nameriginals_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!
__________________
eMac : G4 700mHz - 512Mb - 40Gb - CD-RW - 10.3.9
Power Macintosh G3 : 350Mhz - 896Mb - 6Gb+14Gb - CD-Rom - 10.3.9
iMac : G3 233Mhz - 160Mb - 6Gb - CD-Rom - 10.3.5
PowerBook (Firewire) : G3 500MHz - 12Gb - 384Mb - DVD - 10.4.2
20Gb 4G iPod

May be a nice new iMac G5...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 12:50 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.