Page 1 of 1

Exec and directory

Posted: Tue Dec 19, 2023 11:39 am
by Sharky
This is very strange and I can't see what I'm doing wrong.

The code

Code: Select all

cd "<...>\PhD version files" <various minor routines> exec ".\create all appex v5.prg"
When I run it, I get an error saying that the program 'create all appex v5.prg' isn't found on disk in a totally different place!

Code: Select all

<...>DOCUMENTS\EVIEWS ADDINS\CREATE ALL APPEX V5.PRG not found on disk in "EXEC ".\CREATE ALL APPEX V5.PRG"" on line 35.
I reset with cd directly and try running that line but each time it thinks I'm trying to call a program from an 'eviews addins' folder for some reason.

The status line has the correct Path.

I'm running Eviews 12 University Edition

Re: Exec and directory

Posted: Tue Dec 19, 2023 11:55 am
by EViews Gareth

Re: Exec and directory

Posted: Wed Dec 20, 2023 2:34 am
by Sharky
Thanks Gareth. Any idea why it's calling from addins even though I'm using

Code: Select all

.\
?

Re: Exec and directory

Posted: Wed Dec 20, 2023 8:16 am
by EViews Gareth
Is the program you are running from saved to disk?

Re: Exec and directory

Posted: Wed Dec 20, 2023 8:39 am
by Sharky
Is the program you are running from saved to disk?
Yes, saved to and running from C drive.

Re: Exec and directory

Posted: Wed Dec 20, 2023 8:57 am
by EViews Gareth
Is your copy of EViews up to date?

Re: Exec and directory

Posted: Wed Dec 20, 2023 10:05 am
by Sharky
Is your copy of EViews up to date?
I downloaded Eviews 12 University edition about a month ago - is that up to date?

Re: Exec and directory

Posted: Wed Dec 20, 2023 10:34 am
by EViews Gareth
Should be.

Seems strange.

Can you do the following:
  • Create a brand new program.
  • Enter a single line:

    Code: Select all

    exec ".\foo.prg"
  • Save as "c:\temp\test.prg" (make sure you have a folder called test)
  • Run
It should error saying "c:\temp\foo.prg not found"

Re: Exec and directory

Posted: Wed Dec 20, 2023 12:38 pm
by Sharky
Should be.

Seems strange.

Can you do the following:
  • Create a brand new program.
  • Enter a single line:

    Code: Select all

    exec ".\foo.prg"
  • Save as "c:\temp\test.prg" (make sure you have a folder called test)
  • Run
It should error saying "c:\temp\foo.prg not found"
Not sure what you mean by 'a folder called test' but I saved in both the location specified and a subfolder called 'test'. In both cases I got the error:

Code: Select all

C:\TEMP\TEST\FOO.PRG not found on disk in "EXEC ".\FOO.PRG"" on line 1.

Code: Select all

C:\TEMP\FOO.PRG not found on disk in "EXEC ".\FOO.PRG"" on line 1.

Re: Exec and directory

Posted: Wed Dec 20, 2023 12:40 pm
by EViews Gareth
ok, so that appears to be working correctly. Something specific about your program is causing the weird behaviour.

(and I mean to say a folder called "temp". My bad)

Re: Exec and directory

Posted: Thu Dec 21, 2023 6:56 am
by Sharky
OK I've replaced with include and for some reason it works. Very strange.