Why would you put the PROCEDURE statement in the beginning of the main program? You can safely remove it.
>Hi Sergey,
>
>If the main program in an application begins with somethng like
>
>PROCEDURE MYAPP
>
>Sys(16,1) returns "PROCEDURE MYAPP C:\MYAPPPATH\MYAPP.EXE
>
>In this case justpath(sys(16,1)) fails to provide the correct path.
>
>If the Main program does not begin with PROCEDURE, Sys(16,1) returns just the exe filename with full path and justpath(sys(16,1) will provide the correct path.
>
>justpath(_VFP.ServerName) appears to provide the correct path in either case.
>
>Elmer
--sb--