Re: Folder copy
Re: Folder copy
- Subject: Re: Folder copy
- From: What does not kill you only makes you stronger <email@hidden>
- Date: Wed, 31 Jan 2001 20:02:23 -0600
on 01/29/01 9:01 AM, email@hidden wrote:
>
Hi,
>
>
Is there any way to tell a script to not move a folder that beeing copied?
>
>
I have the following scenario:
>
>
We have a server that we drop folders with lot of files in them, each folder
>
can containg files that is around 20 to 80 megabytes. All folders shall be
>
moved from the "in-folder" then the copy is done.
>
>
I have a script that can move the folders but the script tries to move even
>
if the copy is not finished. Is there a way to tell the script to wait until
>
the copy is over and then move them?
>
>
( I know of the bzy filetype, but this seems not to be applied on folders,
>
just files.)
Uhmm, not specifically that I know of, thought our friend the Finder is now
copy "aware" as of OS 9.1
--begin silly stuff: (As always watch the line wraps and any other Mail
translations that may occur."
property toggle : {}
on run
set toggle to false
end run
on idle
tell application "Finder"
if execution state = copying then --Mac OS 9.1
activate
set position of status window 1 to {408, 386}
activate
display dialog "Copying" giving up after 3 with icon 1
else if execution state copying then --Mac OS 9.1
if toggle = false then
set folderToCopy to folder "BlueBox:Documents:iTunes:iTunes
Music:Sting"
try
with timeout of 1 * 1 seconds
activate
duplicate folderToCopy to folder "BlueBox:Desktop
Folder:test" with replacing
end timeout --get out of copy
end try --get out of copy
set toggle to true
else if toggle = true then
set ToDelete to first folder of folder "BlueBox:Desktop
Folder:test" whose name is "Sting"
move (ToDelete as alias) to trash
empty
set toggle to false
tell me to quit
end if
end if
end tell
return 1 * 1
end idle
- Follow-Ups:
- Re: Folder copy
- From: What does not kill you only makes you stronger <email@hidden>
References: | |
| >Folder copy (From: Peter Mathiessen <email@hidden>) |