Author Topic: error 53 file not found in RUN command  (Read 3013 times)

0 Members and 1 Guest are viewing this topic.

Offline Tommy_81

  • Newbie
  • Posts: 4
    • View Profile
error 53 file not found in RUN command
« on: October 14, 2020, 05:07:11 am »
Hi,
I compiled and created the exe file for my START.BAS file. Inside the START.BAS file I have this instruction to call another BAS:
Code: QB64: [Select]
  1. RUN "INPUT.BAS"

The START.BAS, START.EXE, INPUT.BAS files are all in the same folder (C:\QB45\). Running the EXE file (windows10, administrator privilege) I get error 53 (file not found). The strange thing is that I have this error only for the RUN statement, while OPEN finds the files correctly in the same path.
I also tried this but the problem remains:
Code: QB64: [Select]
  1. RUN "C:\QB45\INPUT.BAS"
or...
Code: QB64: [Select]
  1. RUN "..INPUT.BAS"

Do you have any ideas? Thank you.

Offline Tommy_81

  • Newbie
  • Posts: 4
    • View Profile
Re: error 53 file not found in RUN command
« Reply #1 on: October 14, 2020, 10:15:08 am »
small update.... I tried with the old QBasic compiler (with DosBox) at 16bit and using this:
Code: QB64: [Select]
  1. RUN "C:\QB45\INPUT.BAS"
and everything works! Is it a qb64 bug?
thanks

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: error 53 file not found in RUN command
« Reply #2 on: October 14, 2020, 11:10:38 am »
Not a bug.  QB64 is a compiler, not an interpreter.  You make stand alone EXE files with it, rather than running them inside the IDE.

Due to this change, you can't use RUN with *.BAS files in QB64, as your compiled program wouldn't have a clue what the heck to do with that BAS format.  Instead, compile "INPUT.BAS" to it's executable, and then you should be able to either RUN, or SHELL out to "INPUT.EXE".
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: error 53 file not found in RUN command
« Reply #3 on: October 14, 2020, 12:38:46 pm »
Preferably either (i) group all your code in a single module so you don't need two executables or (ii) compile as Steve said and use SHELL instead of RUN.

Offline Tommy_81

  • Newbie
  • Posts: 4
    • View Profile
Re: error 53 file not found in RUN command
« Reply #4 on: October 14, 2020, 01:04:32 pm »
so the steps are as follows:
  • create the EXE of the INPUT.BAS file
  • use the SHELL statement instead of the RUN to call INPUT.EXE
It's correct. Sorry but I'm a novice with the basic.
Thanks

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: error 53 file not found in RUN command
« Reply #5 on: October 14, 2020, 01:42:20 pm »
Once compiled either way works, I think, though not so sure about RUN.

Welcome to forum Tommy_81, had you thought about Tommy_gun? ;-))

It's funny what you bring up here I was just thinking about here:
https://www.qb64.org/forum/index.php?topic=3126.msg123984#msg123984

Offline Tommy_81

  • Newbie
  • Posts: 4
    • View Profile
Re: error 53 file not found in RUN command
« Reply #6 on: October 15, 2020, 04:16:37 am »
Thanks guy!

i did some tests and it works both run and shell
Code: QB64: [Select]
  1. RUN "INPUT.EXE"
or
Code: QB64: [Select]
  1. SHELL "INPUT.EXE"
The problem now is another, START.EXE calls INPUT.EXE which in turn calls START.EXE (there are no parameter passes, just calls between them). Unfortunately, INPUT remains open in its window, how can I close it when INPUT.EXE calls START.EXE?

I like Tommy-gun :-)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: error 53 file not found in RUN command
« Reply #7 on: October 15, 2020, 08:53:37 am »
In your input program, set it up similar to this:

SHELL _DONTWAIT “Start.exe”
SYSTEM
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!