|
|
AppleScript Help
|
|
|
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
I'm trying to create a simple Folder Action that will automatically file added files based on extension, and I have been stumped all morning. Here's where I am so far:
Code:
on adding folder items to this_folder after receiving these_items
repeat with i from 1 to number of items in these_items
set this_item to item 1 of these_items
set this_item_info to info for this_item
set this_extension to name extension of this_item_info
display dialog "The extension is " & this_extension
if (this_extension is jpg) then
tell application "Finder"
move alias this_item to folder "Pics" of this_folder
end tell
end if
end repeat
end adding folder items to
I'm thinking I need to add the full path of the folder in question or something, but I'm not sure where to go.
|
Scott Genevish
scott AT genevish DOT org
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
I haven't tried compiling or running your script, but do you need quotes around "jpg"?
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
No, that wasn't it, but I tried some more tinkering and found it. All I did was take out the word alias. I was sure I tried that before, but I guess I didn't.
|
Scott Genevish
scott AT genevish DOT org
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|