Executing file in DOS
Results 1 to 6 of 6

Thread: Executing file in DOS

  1. #1
    Join Date
    Dec 2000
    Location
    Illinois, USA
    Posts
    541

    Smile Executing file in DOS

    Appreciate some help. Is it possible to execute a file with an .exe extension in DOS? If so, how is it done?

    For example, have file, lets say: abc.exe on a floppy disk in the A:\ drive, and want to execute the file to drive D:\.

    The PC in question has no OS at this time, just a PRI DOS partition, and an EXT DOS partition.

    Any words of wisdom as to how this is done?

  2. #2
    Join Date
    Aug 1999
    Location
    CANADA
    Posts
    2,175
    I'm not sure what you mean by "execute it to the D drive" ... do you want to copy it?

    You don't execute programs "to" anything... you just execute them (unless it is some kind of utility that will do a specific thing to a drive, like virus scanning, but I am talking general here not specifics)

    You will need to load an operating system in order to do anything... otherwise how are going to type commands? A DOS boot disk (floppy) should be fine for this, it will give you access to the hard drive(s)


    To run the program, you just type its name. You can even leave the .exe part out. DOS will then search for a program with this name in the current drive+directory (as well as other directories specified in something called the "search PATH" which is usually defined upon startup.) If it finds a program it will run it. To run ABC.EXE located in the current directory on the current drive, you would type ABC or ABC.EXE (you only need to be specific with the ".exe" part if there is another program with the same first name, like "ABC.COM" or "ABC.BAT", or if the filename has the same name as a built in DOS command like "DIR")

    I started typing more, but it got to be too much.

    Try these DOS tutorials. I read over them and it should cover everything I wanted to type http://www.glue.umd.edu/~nsw/ench250/dostutor.htm
    http://www.users.globalnet.co.uk/~jchap/tvdt.htm


    Also if the .exe files in question are designed to run under Windows, you will get an error message if you try running them in DOS.
    Last edited by Rapmaster; March 18th, 2003 at 01:57 AM.
    Rapmaster
    (I don't like rap music.)

    Microsoft MVP,
    Windows - Shell/User

  3. #3
    Join Date
    Feb 2000
    Location
    26.03°N 80.14°W
    Posts
    9,410
    A file with an extension of ".exe" contains a set of encoded instructions, a "program" file.

    To "execute a program" is to cause it to begin performing its encoded instructions. (In other words, "execute" means the same thing as "start", "run" or "launch" a program).

    To execute a program in MS-DOS you simply tell DOS exactly where the program file is located. For example, if you have a program named "abc.exe" stored in the root directory of drive A:, you type:
    • a:\abc.exe
    and press [Enter]. That's all there is to it. The instructions contained within "a:\abc.exe" will begin to perform their task.

    If "a:\abc.exe" is a self-extracting compressed file, and you want it to extract its contents to the root directory of drive D:, the command would be:
    • a:\abc.exe d:\
    http://www.computerseasy.com/easydos/messages/1044.html
    Vernon Frazee, Microsoft MVP (Windows - Shell/User)

    Defenses Up!
    Tip: When prompted for a password, give an incorrect one first. A phishing site will accept it; a legitimate one won't.


    Inside Spyware: A Guide to Finding, Removing and Preventing Online Pests


    If you don't keep up with security fixes, your computer|network won't be yours for long.

  4. #4
    Join Date
    Dec 2000
    Location
    Illinois, USA
    Posts
    541

    Smile

    Thanks for the info and the links.
    Very rusty on DOS.

    Have one more question.

    If you have a hard drive partitioned and formatted into C: and D:, with no OS installed, and use a bootdisk to get to A:\, is it possible to run scandisk on C & D? If it is, appreciate knowing how.

  5. #5
    Join Date
    Aug 1999
    Location
    CANADA
    Posts
    2,175
    yes


    But you will need the scandisk program (scandisk.exe) on the disk. I think it will fit. It doesn't even need to be the same disk that you boot up with: you can put it on another floppy and switch the disks as needed.
    Rapmaster
    (I don't like rap music.)

    Microsoft MVP,
    Windows - Shell/User

  6. #6
    Join Date
    Dec 2000
    Location
    Illinois, USA
    Posts
    541

    Smile

    Good.

    Thanks for the info.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •