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

OS 10.6 - Apple script: move all the .avi files

Post Reply New Thread Subscribe

Thread Tools

Member Since: Aug 25, 2009
Posts: 7
pistacchio is on a distinguished road

pistacchio is offline
Hi to all,
I wrote the following script to be used as a folder action. What I want is that, whenever a new .avi or .mov file is added to the folder where i attach it, that file is move to my movies folder.

It is not working thought. Any help?

The code:

property extension_list : {"avi", "mov"}

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 i of these_items
		tell application "Finder"
			if (the name extension of this_item is in the extension_list) then
				tell application "Finder"
					move this_item to "/Users/gu/Movies"
				end tell
			end if
		end tell
	end repeat
end adding folder items to
QUOTE Thanks

Member Since: Nov 16, 2009
Posts: 1
swatkins01 is on a distinguished road

swatkins01 is offline
The problem appears to be the way you stated the path to the destination folder. Instead of "/Users/gu/Movies", I think you need to state the absolute path and use colons as separators instead of forward slashes. I tried your script on my Mac and changed nothing except that and it worked like a charm. That is, I changed the path to: "Lacie:Users:Steve:Movies"
QUOTE Thanks

Post Reply New Thread Subscribe

« Java all messed up after SL install | Incomplete Time Capsule »
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
help me convert something, please. krrose27 Switcher Hangout 4 05-25-2007 02:10 AM

All times are GMT -4. The time now is 02:33 AM.

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?