Hi Rob, thank you very much for the answer, I try to use "map-drives[=True|=False]" option, how to set this option in PC-BASIC? I write the command map-drives[True], it said syntax error.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This program ran with GWBASIC and also on PC-BASIC but now I want to have output file on the desktop, I tried to re-map the drive as shown below and it gets path not found error.
Trying to map pc-basic drives to windows c drive.
In configuration file, I changed mount= to:
map-drives=
mount=A:C\users\evan\desktop
The output file name is beout.txt to be located on the desktop of C:\users\evan\desktop
Tried the program statement as:
100 OPEN "C:\users\evan\desktop\beout.txt" FOR OUTPUT AS #1
or
100 OPEN "C:\beout,txt" FOR OUTPUT AS #1
Getting path not found error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally found my problem after reading a number of other posts. In one post, you noted to exit and then repoen PC-Basic after making a change to the config file. That was it. I had saved the config file but had not closed/opened PC-Basic.
The other problem you noted in your post to me was that I had not removed the # before the mount= and had not left-justified mount= (removed leading spaces).
Now, the output file I located the desktop works properly. It might be good to note in the documentaion and config file comments to close/open PC-Basic after a config file change and also to removet he # and left-justify the changed setting. Thank you for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am try to learn pc-basic, but when I try to open a file it says path not find, I have a physical txt file in the drive.
10 open "i", 1, "d:\test.txt"
then it said path not found in 10
You have to first tell PC-BASIC where you want
D:
to be. It does not automatically use the Windows drives. Please see here: http://robhagemans.github.io/pcbasic/doc/#mountingYou can see the list of files in
D:
with the commandFILES "D:\"
.Hi Rob, thank you very much for the answer, I try to use "map-drives[=True|=False]" option, how to set this option in PC-BASIC? I write the command map-drives[True], it said syntax error.
Thanks
It's not a BASIC command, it's a configuration file option. See the documentation http://robhagemans.github.io/pcbasic/doc/#settings
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
This program ran with GWBASIC and also on PC-BASIC but now I want to have output file on the desktop, I tried to re-map the drive as shown below and it gets path not found error.
Trying to map pc-basic drives to windows c drive.
In configuration file, I changed mount= to:
map-drives=
mount=A:C\users\evan\desktop
The output file name is beout.txt to be located on the desktop of C:\users\evan\desktop
Tried the program statement as:
100 OPEN "C:\users\evan\desktop\beout.txt" FOR OUTPUT AS #1
or
100 OPEN "C:\beout,txt" FOR OUTPUT AS #1
Getting path not found error.
Hi, if you use the mount option as above, the statement should be
since you have assigned the PC-BASIC drive letter
A:
to the WIndows folderC:\users\evan\desktop\
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I must still be doing something wrong
Using statement
100 OPEN "A\beout.txt" FOR OUTPUT AS #1
and config file statement:
mount=A:C:\users\evan\desktop
(tried with and without the leading # - not sure which is correct syntax)
still getting "path not found" error
when I change statement to simply:
100 OPEN "A" FOR OUTPUT AS #1
the program runs with screen output but I assume there's no printed output file
file beout.txt does exist on the desktop
Windows 8, 64bit
screenprints attached
You probably need to remove the spaces and the
#
before the mount option. Also it's100 OPEN "A:\beout.txt" FOR OUTPUT AS #1
so you do need to include the
:
in the path after the drive letterView and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Finally found my problem after reading a number of other posts. In one post, you noted to exit and then repoen PC-Basic after making a change to the config file. That was it. I had saved the config file but had not closed/opened PC-Basic.
The other problem you noted in your post to me was that I had not removed the # before the mount= and had not left-justified mount= (removed leading spaces).
Now, the output file I located the desktop works properly. It might be good to note in the documentaion and config file comments to close/open PC-Basic after a config file change and also to removet he # and left-justify the changed setting. Thank you for your help.