Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Upload To Internet

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

  • Upload To Internet

    Hope someone can help.

    I have created a PBdos routine that creates web pages.

    I need to be able to upload the files to my ISP.

    Could this be done in DOS ?

  • #2
    You'll need to use the FTP protocol to upload a file to a web server. To do this requires a DOS TCP/IP stack - there are commercial stacks around, and at least one brand of DOS (Caldera) supports a DOS stack. There have been various discussions on this subject in this forum in the past few months, but the general gist is this: It is possible but a lot of hassle and work, and potentially expensive.

    It is *much* easier to use a Windows application to do this as a Windows application can use WinSock to handle the task. DOS apps' can launch Win32 applications via the SHELL statement, but Windows 95 or better must be running.

    That said, if you *are* running Windows 95 or better, you'll find a small Windows program called FTP.EXE in the Windows folder, and that should be quite sufficient for you to use... just SHELL to FTP.EXE with the appropriate command-line parameters, and your FTP upload can be handled with relative ease.

    FTP.EXE is a console (Win32) application, so SHELLing to it from a DOS application should give the impression of a seamless "integration" - it can be made to appear as if your DOS app is performing the FTP process itself.

    Therefore, the cheapest and easiest solution could be just under your nose!


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Hi,

      Another small problem !

      Most ISP servers need the file index.htm in lower case.

      How can I get PB Dos to create the file in lower case text ?

      Comment


      • #4
        Frankly, the easiest way would be to have your small Windows FTP program rename the file before transmission.

        Alan
        Alan C. Earnshaw
        Information Management Systems, Inc.
        http://www.infoms.com

        Comment


        • #5
          If you create a file called "index.htm" (rather than "INDEX.HTM") using Windows Explorer, then if the DOS code opens this file it is not renamed with uppercase letters. Therefore it seems possible that you could just create one file and "reuse" it as necessary. This method works in Win2K, but I did not check Win95/98.

          The alternative would be to use some of the LFN routines in order to create a LFN filename with the exact capitalization you require. There should be some code for this on this BBS (a search for "LFN" gets a lot of hits on the BBS). Also search for LFN at www.basicguru.bas/abc



          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment

          Working...
          X