• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Folderaction problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folderaction problem


  • Subject: Folderaction problem
  • From: Jan Bultereys <email@hidden>
  • Date: Tue, 13 Feb 2007 16:03:21 +0100
  • Thread-topic: Folderaction problem

Title: Folderaction problem
HI, I am using ‘folderaction’ with this example script...

When I drop 1 or 2 files it’s OK, but I am having problems when I drop 10 files in the folder...
The problem starts because the files are still in process of copying... How can I prevent this?

Copying files to this location will be an ongoing process, how can I run this folder action ONLY on files that have been copied completely?

Any input is much appreciated

on adding folder items to this_folder after receiving these_items
   tell application "Finder"
        if not (exists folder "Done" of this_folder) then
           make new folder at this_folder with properties {name:"Done"}
        end if
       set the destination_folder to folder "Done" of this_folder as alias
       set the destination_directory to POSIX path of the destination_folder
   end tell
   repeat with i from 1 to number of items in these_items
       set this_item to item i of these_items
       set the item_info to info for this_item
       if this_item is not the destination_folder and the name extension of ¬
            the item_info is not in {"zip", "sit"} then
           set the item_path to the quoted form of the POSIX path of this_item
           set the destination_path to the quoted form of ¬
                (destination_directory & (name of the item_info) & ".zip")
            do shell script ("/usr/bin/ditto -c -k -rsrc --keepParent " & ¬
                item_path & " " & destination_path)
        end if
   end repeat
end
adding folder items to
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Folderaction problem
      • From: "John C. Welch" <email@hidden>
    • Re: Folderaction problem
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: using XML directly from the web rather than a file?
  • Next by Date: Re: Folderaction problem
  • Previous by thread: Re: using XML directly from the web rather than a file?
  • Next by thread: Re: Folderaction problem
  • Index(es):
    • Date
    • Thread