New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Using Files From Folder For Applescript

Post Reply New Thread Subscribe

Thread Tools
The Mule

Member Since: Oct 31, 2011
Posts: 2
The Mule is on a distinguished road

The Mule is offline

I've created an applescript that runs an application if certain criteria are met on files when added to folder. if these criteria aren't met then it checks to see if the file is a folder itself and then runs the same criteria on that folder as well.

currently it works for the initial folder but does nothing on the following folder - this is mainly because i don't know how to properly reference the files in the 'new' folder.

Here is my script in .txt format - hopefully it is self explanatory. the application i'm trying to launch is flicks and the file types are avi and mkv
Attached Files
File Type: txt Untitled.txt (672 Bytes, 1 views)
QUOTE Thanks
The Mule

Member Since: Oct 31, 2011
Posts: 2
The Mule is on a distinguished road

The Mule is offline
I had another idea:

as the script works well for files in the parent folder can i do a simple script swell as that one to extract files from subfolders (when added) and move to parent folder

thus the second script will be innacted and hey presto it does the same thing.

my thought was:

on adding folder items to thisFolder after receiving addedItems
repeat with addedItem in addedItems
tell application "Finder"
if addedItem is "folder" then
set thedata to entire contents of folder "addedItem"
repeat with aItem in thedata
if class of aItem is not folder then
move aItem to folder thisFolder
end if
end repeat
end if
end tell
end repeat

end adding folder items to
QUOTE Thanks

Post Reply New Thread Subscribe

« time machine | Mac shorties »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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 On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Can't view files in shared folder JollyPaperBag OS X - Operating System 0 03-08-2011 02:51 AM
MacBook and External NAS - Folder Cycles Through Files spolebitski OS X - Operating System 0 02-08-2009 12:59 PM

All times are GMT -4. The time now is 02:54 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?