Error message of "file not found"

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Francesca
Newbie
Posts: 3
Joined: Wed Feb 25, 2009 7:46 am

Error message of "file not found"

Post by Francesca »

Hello!
I'm a new user of quickbasic ,and I'm working on a quickbasic implemented programme that my supervisour has created for analysing data with discriminant analysis statistics.
Though, yesterday while trying to run the program on the data obtained from the first run, I incurred in a error messsage saying that it was impossible to run the programme because of 'file not found'.
I don't know anything about quickbasic and it's the first time I'm working on it. I tried to look for some good guide books but I would not lke to spend money on a bad text book. I have Quickbasic 4 of Microsoft, but there are only codes written inside, so I can't understand anything!!
Could somebody out-there give me a hand?!

Looking forward to hearing somebody soon!!

Francesca
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

There could be two kinds of file problems.

1) A module error means that Qbasic cannot find a file that it needs to run.
This will usually ask you to enter the path. The best solution is to keep all of the Qbasic files in ONE folder. Otherwise you need to enter the folder paths in the QB Options menu.

2) Usually, the QB module (BAS) is looking for a file in it's QB folder. Otherwise you have to enter the path. You must use the 8.3 filename and folder limits of DOS. Up to 8 filename characters, DOT, up to 3 letter extension. Folders up to 8 characters only. You can abbreviate using ~1 in both filenames and foldernames if you are referencing Long Filenames. Sometimes you may need ~2 if some filenames are the similar.

It is a good idea to keep all program files in one folder with the compiled program(EXE)! I recommend QB4.5 to compile BAS modules. QB4 is rarely used anymore. You may need to update some code however. It is available free on the web.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Francesca
Newbie
Posts: 3
Joined: Wed Feb 25, 2009 7:46 am

Error message of "file not found"

Post by Francesca »

Dear Ted,
thank you really a lot!
I'll try to do as you tell me, which is, if I undrstood well, just to create files with the name you tell me.
But in the meanwhile I think I've solved the problem, which will b eto run anither program.
But, in any case I would like to ask you , or anyonelse that is stretching the ear to my problem, if there is a good manual of QB, or at least of programming that could be useful to me to undrstand what I'm doing.
I have no expreience of programming, and I would need something like a crush-course.
Hope somebody can help me!
Looking forward to hearing from you.


Francesca
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Try looking for used manuals or books. Microsoft Press made quite a few. All are out of print by now!

The only other option is to try to understand the QB Help Index. I have a QB tutorial download at:

http://www.qbasicstation.com/index.php? ... &filecat=3

Download Q-Basics.Zip from the list and unzip it into your Qbasic folder. It shows you how things actually work!

Quickbasic 4.5 is also in the Member Subs and Functions list there.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Francesca
Newbie
Posts: 3
Joined: Wed Feb 25, 2009 7:46 am

Post by Francesca »

Dear Ted,

I'll try an dlooking what you tell me.
Thanks a lot!


Francesca
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

suggestion

Post by iamdenteddisk »

the problem is probably not a real error, but a explanation of whats wrong meaning, Open the source file and look for a "open" line that reads like this,

Open "C:\foldername\filename.dat" for input as 1#
this is the path where it is looking for the data if it isn't there then put it there or change the path in the source.

most likely you dont have it in a folder of the same name or on a different drive. so Change the "path" that it looks for the data file. save it and retry


Also "QB" and "dos" don't like long file or folder names so what ever it is named does matter, as long as you keep it to less than 8 characters with no spaces you should be ok.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

WHAT THE HELL? Did you not read my previous replies iamdenteddisk?

2 months ago you were asking all of the questions. NOW you are an expert? I DOUBT THAT!

You CAN have spaces in DOS filenames! Read the book!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

sihabbla?

Post by iamdenteddisk »

yes I did ask a few questions but that don't make me a retard burger, and who said anything about not supporting spaces?

I guess I could have worded it to say, "spaces count as characters too".

I have been hacking away at one of these critters for almost 30 years, just because I ask how to do somthing I never atempted before don't make me dumb to programming..

besides that the questions I asked was on using sound card and port inturupts not Qbasic/dos..

I thought give and take contribution was the spirit of the forum? am I wrong?

besides that sometimes a answer is corect yet not plain and it takes "translation" to "people speak" to understand the previous offering.

I could understand dismay if I had said "WHAT THE HELL" does that mean.. or I could look and say, well his reply supports what I said as correct "seconded" right!

too literal, too assertive maybe needs a perscription or a break?

why get upset when somebody agrees with you?
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

YOU JUST replied to 6 posts just to put your 2 cents in!

I consider that to be non-productive! Don't you? Apparently not.......

If you have something ELSE to point out then there is no problem. But you have done this repeatedly for posts that have mostly been answered appropriately, and usually, the poster is long gone!

PLUS you have given some bad answers. That helps nobody!

Please consider your posts before answering. Thanks!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Post Reply