From: Charles Simonson on
The source file that I want to copy can be anywhere, be it in the projector
directory or a subfolder. I am the only one who will run this projector so the
file organization doesn't need to be totally clean. I think the only problem I
am having right now is just how to put the code in so that it writes to the
flash drive?

As you stated and from the error messages, it appears that the script is
unable to find my flash drive. Most likely this is just an error on my part
with the code I have written telling Director the path to my flash drive. So I
think my only question now is just how do I write the path so that it copies
the file to my flash drive? If any one knows how to write the code for
directing to a path with Mac OS X, it would be very helpful. All the examples I
have seen use Windows as the OS, and it does not appear that Director is
looking for the path structure that the Mac OS X command line uses.

I also pasted the secondary code into the movie, but received the same error
message that I got for the first code you posted. BTW, where can I find what
the error message codes mean? With your latest code and I am now getting a '1'
response. Thanks for you continued patience.

From: Sean Wilson on
> With your latest code and I am now getting a '1' response.

1 means your source file path is invalid. I posted that example in case
you wanted to copy from a sub-directory (in the case that I posted, a
folder named "movies" specifically).
Buddy API error codes are in the docs. I don't know what form the docs
take on a Mac - mine is a Windows .hlp file
The second block I posted /should/ take care of locating your Flash
drive *without* using Unix-style paths (which may be tripping up Buddy API).
To copy a file named "480p.mov" from your source folder to the first
removable drive found try the following:
--
on mouseUp me
lDisks = baDiskList()
lTargets = []
repeat with aDisk in lDisks
if baDiskInfo(aDisk, "type") = "Removable" then
-- found (potential) target
lTargets.append(aDisk)
end if
end repeat
case count(lTargets) of
0: -- no removable drives available to copy to
alert "Drive not found"
1:
tSource = _movie.path & "480p.mov"
tDest = lTargets[1] & "480p.mov"
me.mCopyFile(tSource, tDest)
otherwise:
-- more than one removable drive available
-- you'll need to create a routine to determine
-- which one you want to copy to, or present the user with
-- a selection they can choose from
tFolder = baGetFolder(lTargets[1], "Select a folder to copy to:",
0, "Choose folder", -1, -1)
if (tFolder = EMPTY) then exit
tSource = _movie.path & "480p.mov"
tDest = tFolder & "480p.mov"
me.mCopyFile(tSource, tDest)
end case
end

on mCopyFile me, aSource, aDestination
OK = baCopyFileProgress(aSource, aDestination, "IfNewer", "Copying
Movie to disk...", "Cancel", 0)
if OK <> 0 then alert string(OK)
end
From: Charles Simonson on
[b]Brilliant!!![/b]

Sean, you're the man! A big [b]THANK YOU[/b] to you and every one else for their help on this issue.