revCopy file in OSX doesn't work

Dave dave at
Tue Jan 13 05:08:03 EST 2009

On 12 Jan 2009, at 23:31, Sarah Reichelt wrote:

> On Tue, Jan 13, 2009 at 9:03 AM, Sieg Lindstrom
> <sl at> wrote:
>> I've searched the archives and see this problem has been discussed  
>> before,
>> but none of the advice therein helped me. Any idea why this code  
>> works for
>> me in OSX...
>> if there is a file "1-meet data/ABC affils" then put "found"
>> But the following does not?
>> on mouseUp
>> -- "1-meet data" is the folder containing the file I'd like to copy.
>> -- "2-processed meet data" is the folder I'd like to copy to.
>> --Both folders are in the defaultFolder.
>> --"ABC affils" is the name of a .txt file
>>    revCopyFile "1-meet data/ABC affils", "2-processed meet data"
>> end mouseUp
>> The file does not get copied and the result is "execution error."
>> The fact that the first code fragment works suggests I have the  
>> file path
>> right. But revCopy File disagrees.
> "there is a file" allows relative file paths and will search in the
> defaultFolder.
> revCopyFile requires a complete file path, including the folder. This
> is because it actually calls an AppleScript (on OS X) to do the file
> copying.

As a tip, I always use the full path when referring to files and  
folders, I never rely on the default folder or any of the Revolution  
quirks. This is useful since RunRev is not consistent in terms of  
what type of file specification is given to internal functions (but  
they all accept a full path string) and also it's much easier to  
debug with full paths, since you can easily copy and paste the fill  
path string into other applications, e.g. terminal.

Hope this helps

More information about the Use-livecode mailing list