• 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
linimg to moving target with folder actions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linimg to moving target with folder actions


  • Subject: linimg to moving target with folder actions
  • From: brian <email@hidden>
  • Date: Tue, 30 Jan 2001 01:49:48 -0500

I'm trying to create a script to be used as a folder action that will ask
for user input to choose a target folder the first time it runs and
subsequently use the provided info to copy files from a local hard drive to
a moving target folder (name remains constant) on a server. So far I'm
stumped.

I can (outside of Applescript) manually create an alias of the target folder
and put it on my desktop and since the name of the folder is constant the
Finder seems to have no trouble finding it on the server no matter where it
gets moved to.

Unfortunately, when I tried to script this approach in Applescript, I end up
with a -43 error (can't remember exact translation from apple's site but it
was basically can't find the file or dir you specified...)

Tried to set the alias in Applescript, which worked until I moved the target
folder. After the move I ended up with -120 errors also a can't get dir
error.

Also tried to use the folder action syntax of on adding items....preceeded
by a few choose folder prompts and attach that to the source folder:

set target to choose folder with prompt "target?"
set source to choose folder with prompt "source?"
on adding folder items to source after receiving added_items
tell application "Finder"
move every item of source to target
end tell
end adding folder items to

Since I can't get any of these to work I'm now resigning myself to building
an app that runs constantly watching the source folder and moving its items
to the target folder that I could make a startup item. Problem solved, but
I'd still like to know if its possible use the more elegant folder action
approach to eliminate a constantly running app? Or am I just being too hard
on myself?


  • Prev by Date: WWW?sdoc - how do I read PATH_INFO variable?
  • Next by Date: Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?
  • Previous by thread: WWW?sdoc - how do I read PATH_INFO variable?
  • Next by thread: Re: linimg to moving target with folder actions
  • Index(es):
    • Date
    • Thread