Read with Formatting | Join TechSpot! (it's free) | Bookmark / Share this



The legend of DOS?

TeCH_HuNGeRY
02-18-2004, 05:44 PM
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...

TeCH_HuNGeRY
02-18-2004, 06:13 PM
ok i realize chdir changes directories....but to make a batch file that changes directories apon typing G.bat etc?

Ad
02-18-2004, 06:13 PM

acidosmosis
02-18-2004, 07:50 PM
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.

TeCH_HuNGeRY
02-18-2004, 08:27 PM
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...

Nodsu
02-19-2004, 02:16 AM
Change directories to where? Randomly change directories? Why 4 batch files? Are they supposed to do different things? Should there be command line arguments?

RealBlackStuff
02-19-2004, 04:15 AM
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.

TeCH_HuNGeRY
02-19-2004, 10:28 PM
k thank u all...on that note...any recomended sights to learn bout.."the legend of DOS"?

RealBlackStuff
02-20-2004, 07:28 AM
Start with the basics from here:
http://www.pccomputernotes.com/operating_systems/osintro01.htm

Then use Google and set up a search for anything else you want to know.

Liquidlen
02-20-2004, 09:02 AM
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.

 Top Technology News

 Software Downloads

Copyright © 1998-2008 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.