Menu

path not find

deeprnoth
2017-09-17
2017-09-17
  • deeprnoth

    deeprnoth - 2017-09-17

    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.

     
  • deeprnoth

    deeprnoth - 2017-09-17

    10 open "i", 1, "d:\test.txt"

    then it said path not found in 10

     
  • Rob Hagemans

    Rob Hagemans - 2017-09-17

    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/#mounting

    You can see the list of files in D: with the command FILES "D:\".

     
  • deeprnoth

    deeprnoth - 2017-09-17

    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

     
    • Rob Hagemans

      Rob Hagemans - 2017-09-17

      It's not a BASIC command, it's a configuration file option. See the documentation http://robhagemans.github.io/pcbasic/doc/#settings

       
  • Anonymous

    Anonymous - 2017-10-09

    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.

     
    • Rob Hagemans

      Rob Hagemans - 2017-10-10

      Hi, if you use the mount option as above, the statement should be

      100 OPEN "A:\beout.txt" FOR OUTPUT AS #1
      

      since you have assigned the PC-BASIC drive letter A: to the WIndows folder C:\users\evan\desktop\

       
  • Anonymous

    Anonymous - 2017-10-11

    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

     
  • Rob Hagemans

    Rob Hagemans - 2017-10-14

    You probably need to remove the spaces and the # before the mount option. Also it's
    100 OPEN "A:\beout.txt" FOR OUTPUT AS #1

    so you do need to include the : in the path after the drive letter

     
  • Anonymous

    Anonymous - 2017-10-18

    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.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.