TechSpot

The legend of DOS?

By TeCH_HuNGeRY
Feb 18, 2004
  1. I need to make a Batch file that changed directories apon typing G, B, V, and K. So essentially [if I am correct, G. Bat B Bat.V Bat. K. Bat. Ultimatly this is supposed to start solitaire...any tips or suggestions would be greatly apreciated...
     
  2. TeCH_HuNGeRY

    TeCH_HuNGeRY TS Rookie Topic Starter

    ok i realize chdir changes directories....but to make a batch file that changes directories apon typing G.bat etc?
     
  3. acidosmosis

    acidosmosis TechSpot Chancellor Posts: 1,350

    That is a bit confusing.

    If you were going to change directorys, you would have to specify what directory your changing to using either "cd <directory>", "cd..", etc. The batch file would have to be in the correct directory for that to work too (but a cd.. command would work regardless of where you are. it just wouldnt take you anywhere if you werent under a sub-folder).

    Explain in a bit more detail exactly what your trying to do.
     
  4. TeCH_HuNGeRY

    TeCH_HuNGeRY TS Rookie Topic Starter

    ok I have a assignment in which I am to create a batch file that changes directories apon typing G.Bat , B.Bat V.Bat and K.Bat...
    It is to start the game solitire......thats it...as it is written by the teacher...
     
  5. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    Change directories to where? Randomly change directories? Why 4 batch files? Are they supposed to do different things? Should there be command line arguments?
     
  6. RealBlackStuff

    RealBlackStuff TS Rookie Posts: 6,503

    To make a batchfile to go to the G-drive, where (for argument's sake) Solitaire would be in Directory Games and Subdirectory Solitaire, you create a batchfile G.BAT as follows:
    Open Notepad and type in the following instructions, each on a separate line.

    g:
    cd \games\solitaire
    solitaire.exe (or whatever the game's programname is)
    cd \
    c:

    Now click on File/Save as and browse to the root of the C-drive where you save it under the
    name G with the extension BAT


    That is all.
     
  7. TeCH_HuNGeRY

    TeCH_HuNGeRY TS Rookie Topic Starter

    k thank u all...on that note...any recomended sights to learn bout.."the legend of DOS"?
     
  8. RealBlackStuff

    RealBlackStuff TS Rookie Posts: 6,503

  9. Liquidlen

    Liquidlen TechSpot Paladin Posts: 1,094

    FYI
    A great book for Dos training and reference if your like me and use dos but infrequently.
    Carolyn Z Gillay & Bette A. Peat , Franklin,Beadle & Associates
    Windows 2000 Pro Command Line
    Also check for her latest Command Line release because it updates for Win XP some command changes in use, etc.
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...