Rename File on Server not working?

Rick Harrison harrison at
Mon May 8 20:22:44 EDT 2017

Hi Richard,

The result says:

can't rename file (20)

I see that you are using a “move file” in your example.
The dictionary doesn’t show an example for moving a file.

I tried the following example to see what would happen:

move file OldImagePathAndFileName to tFileName
  if the result is not empty then
	put the result && "(" & sysError() &")"
 end if

I’m getting:   move: missing ‘to'

This seems rather bizarre to me.

Your thoughts?


> On May 8, 2017, at 7:29 PM, Richard Gaskin via use-livecode <use-livecode at> wrote:
> Rick Harrison wrote:
>> I was trying to use rename file
>> on the Server in a .lc script
>> to rename a file.  It doesn’t
>> seem to work at all.  Can
>> someone please let me know
>> if it works on an LC Server?
> It should.  Try checking the result immediately after, and if not empty call sysError() for the OS error number, e.g.:
>  move file tSrcPath to tDestPath
>  if the result is not empty then
>     put the result && "(" & sysError() &")"
>  end if
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at      
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list