Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Running DOS commands in Quickbasic

plbiggsiiplbiggsii Member Posts: 1
I am just starting out learning more about Quickbasic. I have some background in the language as well as C/C++ and COBOL; so, I am a little familiar with the basics. My question is, Is it possible to run DOS commands within Quickbasic? I know there is the FILES command that is pretty much the same as DIR in DOS. I need to run DIR with switches as well as NDIR for my Novell environment. I want to write the results of the DIR/NDIR to file and extract data from it (i.e. folder names and sizes). Please let me know if this is possible. Thanks.


  • brisraybrisray Member Posts: 60
    You can run DOS commands in QBasic using the shell command.

    To do what you want use something like SHELL "Dir > c:dir.txt"

    You may run into some differences between running some commands through SHELL and from the command line. Some combinations of QBasic and some Windows versions causes a separate version of to be run. This contains slightly different DOS commands to those in to be run. DIR is an example of this. I use Windows 2000 and the layout of the results of DIR is different when running it through QBasic.

  • Shawn CarterShawn Carter Member Posts: 0

    __ | | free ebooks and video tutorials about | MATLAB Go Java Python Swift PHP PL/SQL Objective-C Perl R Visual Basic .NET Ruby JavaScript C# Scratch Delphi C Visual Basic C++ Assembly Hack Crystal Lua Bash F# COBOL Lisp Dart Clojure ML Apex Fortran Transact-SQL ABAP Ada LabVIEW Scala Rust VBScript FoxPro Julia Kotlin Prolog Erlang Alice SAS Scheme Logo D Awk | _________

Sign In or Register to comment.