rename&revcopyfile

Klaus Major kmajor at metascape.org
Thu Apr 11 07:57:01 EDT 2002


Hi John and all,

> ....
> rename function on a mac deletes the original file and copies the file 
> to
> the new location. On Win98 it gives the file at fp1 the new name only 
> and
> does not move the file. Even though it has a different file path.
>
>
> I can not get the revcopyfile to work on win98. Has anyone else had this
> problem.
> I checked to make sure the file paths where correct. By doing a open 
> file
> then close.
> ...


there is a tiny bug in the "revlibrary.rev", script of button "revCommon"

....
on revCopyFile pSrcFile, pDestFile
   if the platform is "MacOS" then
     if "applescript" is in the alternateLanguages then
       do revAppleScriptFull(copyFile,pSrcFile,pDestFile) as applescript
     else return "Error: AppleScript not installed"
   else if the platform is "Win32" then
     revSetWindowsShellCommand
     set the itemDel to "/"
   ####   put item -1 of pSrcFile into tFileName
   ####  not necessary, see below

     set the itemDel to comma
  ####  get shell ("copy" && 
revWindowsFromUnixPath(quote&pSrcFile&quote) && 
revWindowsFromUnixPath(quote&pDestFile&"\"&tFileName&quote))
  #### wont work, does not even give an error
  #### 1 concenating too much... ;-)
  ####pDestFile contains the complete path to the destination-file 
including the filename.

  get shell ("copy" && revWindowsFromUnixPath(quote&pSrcFile&quote) && 
revWindowsFromUnixPath(quote&pDestFile&quote))
#### this works

   else
     get shell ("cp -f" && quote&pSrcFile&quote && quote&pDestFile&quote)
   end if
   return the result
end revCopyFile


Hope this helps.

You can fix it by yourself, if you have a license.

But i am sure this will be fixed by the RR-team very quick.
Right, Kevin ?


Regards


Klaus Major
kmajor at metascape.org




More information about the use-livecode mailing list