initialising a DOS program from a C enviroment

This is a discussion on initialising a DOS program from a C enviroment within the C Programming forums, part of the General Programming Boards category; I want to run a DOS program from within a C enviroment so when the user selects something from this ...

  1. #1
    Registered User Robert_Ingleby's Avatar
    Join Date
    Oct 2001
    Posts
    57

    initialising a DOS program from a C enviroment

    I want to run a DOS program from within a C enviroment so when the user selects something from this C compiled program it instigates another program , say a Batch file that is already on the hard disk.

    How is this done?

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825

  3. #3
    Registered User Robert_Ingleby's Avatar
    Join Date
    Oct 2001
    Posts
    57

    What about Simple Dos Commands

    If i wanted to copy a series of dos files onto a FDD how would I write the copy command into my program? i.e. how to Implement DOS commands into my code such as copy, format, scandisketc?

    is there any way of making the files I want to copy into *.dat files so people are unable to see the indivdual files from explorer?

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Well, if you wanted to, you could use System to do all of those...

  5. #5
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    You can use the system() command. Not a portabel solution but it works

  6. #6
    Registered User Robert_Ingleby's Avatar
    Join Date
    Oct 2001
    Posts
    57

    encrypting a DOS file

    youre right, that does work. But by opening the root of the drive im copying from, the user can see the files which I want to copy.

    Is there any way of converting them so they form a DATA file. That way, the user is unable to see the files I want to copy.

    Hope you understand what I mean.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Microsoft Visual C++ DOS program quitting
    By stanlvw in forum C++ Programming
    Replies: 5
    Last Post: 02-29-2008, 05:15 AM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  3. Can I issue a command to DOS from within a program?
    By Sukarn in forum Windows Programming
    Replies: 2
    Last Post: 12-22-2006, 06:44 AM
  4. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 10:17 PM
  5. Compiling a program in VC++ and run it in DOS
    By Willhunting in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 01-18-2003, 03:09 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21