SysChat

SysChat (http://www.syschat.com/forum.php)
-   General Tech Support (http://www.syschat.com/general/general-tech-support/)
-   -   Problem with commands in DOS (http://www.syschat.com/problem-with-commands-in-dos-2459.html)

mlee0332 07-30-2007 11:10 PM

Problem with commands in DOS
 
I am trying to make modifications to the file system using dos - mods that cannot be done while the computer is booted into the OS.

I downloaded the MS-DOS 7.1 boot disk from here and I cannot get it to perform the following commands:

Choice

Move

I have checked the syntax a hundred times, but it still says bad command. How do I make them work? Every site that I look at says that the two are internal commands included with MS-DOS 6 and higher.

mhookem 07-31-2007 04:54 PM

Dos
 
Hello, next time you start DOS type HELP to get a list of available commands you can use after DOS has been loaded.

Let me know if the commands you're trying to use are there.

Regards

Martin

mlee0332 07-31-2007 09:59 PM

help does not give me any options.

This is the full blown dos, not command prompt if that helps.

mhookem 08-01-2007 07:52 AM

DOS External Commands
 
Quote:

Originally Posted by mlee0332 (Post 7656)
help does not give me any options.

This is the full blown dos, not command prompt if that helps.

Ok, I think with version 7.1 they're external try searching for them:

Type - path c:\program*

Replace* with either 'MOVE.EXE' or 'CHOICE.COM'

If they're there, it should find them.

Regards

Martin

mlee0332 08-01-2007 09:40 PM

I found choice. something, but I haven't come across the other. Can you load cmd.exe in dos?

mhookem 08-02-2007 11:23 AM

Command.com
 
Quote:

Originally Posted by mlee0332 (Post 7660)
I found choice. something, but I haven't come across the other. Can you load cmd.exe in dos?

Hello, I'm not sure if cmd.exe is compatible with 7.1. Under XP with cmd open, you can type in either START CMD which will open another instance of cmd.exe or you can type START COMMAND which will open up an instance of Command.com.

Some people are saying they are the same thing while others are saying that it is a different format, and others say despite the .com extension it is actually and exe file.
Although I'd agree with it being a slightly different format which could cause problems running under 7.1.

I don't have 7.1 running on any PC at the moment so I can experiment myself, so I would suggest trying it, you might need to put cmd.exe into the appropriate directory for 7.1 and then see if you can load it?

I'll have another look around and see if we can find 'MOVE'.

Regards

Martin

mlee0332 08-02-2007 08:54 PM

Actually, I found move and I also found choice scattered about in some CDs I had. Choice was on NAV2003, random, right? and I found a website that allowed me to download move.com.

BUT, I still have one other problem, with appending the date to a file.

When I tell it to make the date go into a file, I use this formula:

EX:

rem Make Directory With Name and Date
for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%b-%%c

md %xdate%rgb

it should come out as "08-02rgb" but it comes out "rgb."

AND, how do I make it test for a file on one of the cdroms with out displaying the "Drive is not ready. Retry, Abort, Fail?" message? Or make it automatically abort or fail when this message will be prompted.

I am writing a program that runs in DOS for work, and it would be a pain to have to tell it abort each time it needs to figure out in which CD drive the CD is located.

Thanks!

mhookem 08-03-2007 09:40 AM

Abort\Re-try\Fail????
 
To force a failure on the drive and avoid the message, use COMMAND \F.

For the date, change the delims to 1-2 and if you only need to use '-' after the '=' sign as this is how the command separates the values (%%b-%%c)
I don't know what the switch '/t' is for, I can't find it anywhere, and I don't think 'XDATE' works in DOS??????

REM is for recording comments for a batch file or for CONFIG.SYS and you might be better of using the double colon ( :: ) instead for better efficiency.

Try making the directory first, open up the details and view the timestamp on the file by typing C:\dir etc.

Regards

Martin

P.S. You can't use the symbols 0-9 either as a variable either!!!!!

mlee0332 08-03-2007 06:53 PM

Ok, I followed you up until the "You can't use 0-9" part. What did you mean?

mhookem 08-04-2007 02:32 AM

FOR %variable IN (set) DO Command
 
When using the %variable in batch files, the '%' must be preceeded by another '%'. And to avoid confusion with the batch file parameters %0-%9, the variable can be anything except the symbols 0-9.

Regards

Martin


All times are GMT -4. The time now is 12:15 PM.


Copyright © 2005-2013 SysChat.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54