Announcement

Collapse
No announcement yet.

Access files on other computers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access files on other computers?

    In Powerbasic for DOS, it is not possible to open, read, edit, write, close files on other computers connected to each other via network, is it? I could work around it by insisting the data files be in the same folder as the program itself, but I am trying to be flexible. Has anyone done it so that I can review how it was done?

    In other words, suppose my Powerbasic program is on computer "B" drive C: but the data file is on Computer "C" drive D. Can I access that file across the network? I am betting no, but I sure would like to!

    Thanks.

    Robert

  • #2
    >I am betting no, but I sure would like to!

    Not so loud; you will get many many takers and end up dead broke.

    I'm not sure you can use a UNC name for the file, but if it's mapped to a drive letter it works just fine.

    In your example, you have to map Computer "C's" drive D: (which must be a share) to "something" on computer B, eg "J:" or "W:" or something.

    After that you just
    Code:
    Filename =  "J:\path\filename"
    OPEN FileName for ..... ACCESS  ... LOCK  .... AS ....
    and that it is on another computer is totally transparent to your application.

    (Of course, you DO have to be running MS-DOS 3.1 or later. and you probably have to load some kind of network software at bootup).

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Got to thinking about your question. Wrote the following test code.
      Code:
      	$lib all off
              color 14,1
              cls
      
              f$ = "\\RemoteComputer\Sub Dir 1\Sub Dir 2\"
              mask$ = "*.*"
      
              f$ = f$ + mask$
      
      	te$ = dir$(f$)
              do until te$ = ""
              print;te$
              te$ = dir$
              loop
      Returns short file name(s) but works perfectly (under xp).
      There are no atheists in a fox hole or the morning of a math test.
      If my flag offends you, I'll help you pack.

      Comment


      • #4
        Originally posted by Michael Mattias View Post
        (Of course, you DO have to be running MS-DOS 3.1 or later. and you probably have to load some kind of network software at bootup).
        MCM
        It makes a difference whether you are using a computer that boots DOS, a OS/2 VDM, dosemu, or VirtualBox.

        Booting real DOS: You will need a driver for your NIC. Since this will likely be an old computer, you can use a NE2000 clone (mostly ISA, but a few PCI's are out there) or a 3Com 3C515 (ISA) for something pretty easy to get going. Novell DOS 7 and Caldera OpenDOS 7.01 have a decent number of antique NIC drivers included, but don't expect to get Windows 3.1 to work easily.

        OS/2 VDM: The card may already be supported by OS/2. If not, you can load a DOS driver into individual VDMs or, as a last resort, use a specific DOS session.

        dosemu: Already supports NE2000 with no additional driver needed. Don't expect to be able to use Win3.1.

        VirtualBox: Good luck finding a DOS driver for the NICs it offers to guests. You might be better off using Win9x or OS/2 for your guest.
        Erich Schulman (KT4VOL/KTN4CA)
        Go Big Orange

        Comment


        • #5
          If you are looking for networking software for msdos, i can recommend Lantastic. But before you do that, i would strongly suggest you make use of the networking capabilities in windows nt versions(2000 and up). If you want use the netbeui protocol only, it is faster than nebios over tcp/ip and does not come with a lot of the security concerns of having a protocol such as tcp/ip. A lot of the networking printers and print servers do not support the Netbeui protocol, forcing you to use netbios over tcp/ip if you are going to use networked printers. Lantastic can also run on a windows nt os.
          p purvis

          Comment


          • #6
            It makes a difference whether you are using a computer that boots DOS, a OS/2 VDM, dosemu, or VirtualBox.
            Is one of these what you get if you are running Windows/XP?

            (I don't do networks. I take over when the client's 'network guy [or gal]' says, "OK, your file is on what you will see as drive 'L' ")



            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              What it sounds like is that you want to map a network drive.
              Windows comes with built-in networking.

              Server:
              If using Win98/XP/Vista click on My Computer or Computer.
              Right click the drive to share and using Sharing option.

              On the stations:
              In My Computer or Computer using Vista
              Find the drive to map to and right click on it.
              Assign a drive letter to it using the map option.
              You can map to either the root or a folder on the server.

              You may have to go through a network setup wizard.
              What operating system is being used?

              Comment


              • #8
                (Of course, you DO have to be running MS-DOS 3.1 or later. and you probably have to load some kind of network software at bootup).
                That is the main thing I sought to address. Unless you are using dosemu, you do need to be able to support networking. Writing a DOS application that supports networking is fine -- unless you have no support for networking. That is where I got into trouble when I tried to set up Caldera OpenDOS as a VirtualBox guest. I could not find any drivers for the NICs it provides to guests.

                Originally posted by Michael Mattias View Post
                Is one of these what you get if you are running Windows/XP?

                (I don't do networks. I take over when the client's 'network guy [or gal]' says, "OK, your file is on what you will see as drive 'L' ")
                MCM
                I don't know why the topic creator is targeting DOS, but I assume he has his reason(s) for not targeting Win32 instead.

                If he has set aside a 486 or P133 booting real DOS (MS, PC/IBM, Novell, Caldera, DR, FreeDOS, whatever) it should be cheap and easy to get a ISA NE2000 clone and drivers for it. A 3Com 3C515 could reach 70% of the throughput of a PCI 10/100 card and needs DOS drivers not too hard to find.

                I have had excellent results with 16-bit programs in Win2000 SP4 and XP SP2 (not so much SP3). If you go for a DOS guest in VirtualBox, you may never get network support unless you can find the right NIC drivers. It might be easier if you don't even try by changing your guest. Win9x and OS/2 are lightweight compared to 200x/XP/Vista/7 and don't impose some of the restrictions you have on NT systems (the same things that made 9x more crash-prone). OS/2 would even give you the benefit of the guest additions, something you don't get with Win9x guests. Either way, you just need the virtual NIC to be supported by the guest OS, and that is more easily accomplished than using a DOS guest.
                Erich Schulman (KT4VOL/KTN4CA)
                Go Big Orange

                Comment


                • #9
                  FWIW, as long as you are looking at sharing files, maybe you'd be interested in reading this article...

                  "Fundamentals Of Multi-User Programming." Article published in December 1995 issue of "BASICally Speaking" magazine discussing the principles of writing multi-user programs; code samples in BASIC. Rich Text format; placed in the Public Domain June 2005
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment

                  Working...
                  X
                  😀
                  🥰
                  🤢
                  😎
                  😡
                  👍
                  👎