RevCopyFolder XP problem

David Glasgow david at
Thu Jan 1 07:37:24 EST 2009

> Way back in October, Eric, Ken and others helped out with  
> identifying special folders in XP and Vista, in which I could save  
> shared and non shared data.  (Because the system I used in my app  
> previously breaks under Vista).
> Having finally decided on appropriate locations and file  
> structures, I have started to script a routine which checks on the  
> platform, then checks in each location for the expected folders,  
> and copies them there if they are not present.
> Debugging is a bit of a painful process on Windows, because I am  
> using Studio on Mac and testing under Parallels (XP).  However, as  
> far as I can tell, RevCopyFolder doesn't work as advertised on XP.   
> In the Rev 2.0 language reference it states:
> "The revCopyFolder command makes a copy of the entire folder,  
> including all files, subfolders, and their contents. The folder  
> remains in its original location and the copy is placed in the new  
> location."
> I only get the top level (i.e  foldertocopy) folder created in the  
> new location, with none of its contents, be they files or folders.   
> I look at the result for each instance of RevCopyFolder after each  
> partial successful copy, which gives me the numerical value '4'.
> I know that RevCopyFolder seems to be very erratic on the Mac, but  
> is my problem on Win recognised by others?  Is there an easy  
> workaround?
> Thanks
> David Glasgow

Cracked it!  Thought I would post the solution just in case it helps  
someone else.

I have no idea why 'the result' is 4, as described above, but this  
only happens if revcopyfolder fails.  And when I say "fails", I  
discovered that if the foldertocopy can't be found, Rev doesn't  
complain, it just creates a folder of the designated name at the  
designated destination and puts '4' in the result.  It looks like the  
command has succeeded, until you examine the (non existent) folder  

And why couldn't the foldertocopy be found?  Because revcopyfolder  
doesn't like relative file paths.  The same script with absolute  
paths works fine.

Hmmm.  Starting 2009 on a roll.

Hope no Revistas spent too much time trying to help me.

David G

More information about the Use-livecode mailing list