Results 1 to 2 of 2
  1. #1

    Member Since
    Aug 25, 2009
    Apple script: move all the .avi files
    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

  2. #2

    Member Since
    Nov 16, 2009
    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"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Apple TV and AVI files
    By nalepa in forum Apple TV
    Replies: 5
    Last Post: 12-31-2011, 09:36 PM
  2. Script to duplicate Apple Lossless iTunes library as MP3 files
    By nick_harambee in forum macOS - Operating System
    Replies: 10
    Last Post: 10-02-2010, 08:53 AM
  3. Can I use an Apple remote for avi files on my macbook pro?
    By jeffreyzwerner in forum macOS - Apps and Games
    Replies: 0
    Last Post: 10-08-2009, 02:38 PM
  4. Folder icon has a small lock....cannot move files or move to trash
    By gagliano3 in forum macOS - Operating System
    Replies: 3
    Last Post: 05-02-2009, 11:27 PM
  5. Apple TV and AVI files
    By joe.morgan in forum Other Hardware and Peripherals
    Replies: 6
    Last Post: 08-13-2008, 04:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts