PowerUsers.info - Paul Doherty Askme Archive of Questions and Answers

Return to AskMe Archive Main Page

Return to Main PowerUsers.info Main Page

**********************************************************************

Category : DOS


QAId : 3085737
Asker : sammy_lb_2000
Subject : WINDOWS DOS FILES
Private : No

Question : HELLO EVERYONE,

CAN YOU PLEASE TELL ME WHY WINDOWS HAVE THESE
DOS FILES UNDER DIFFERENT NAMES, EVEN THOUGH
THEIR CONTENTS ARE THE SAME? WHAT HAPPENS IF
THEY GET CORRUPTED OR DELETED? WHAT THE .PIF
EXTENSION STAND FOR?. THE FILES ARE:

1). DOSPRMPT.PIF
2). COMMAND.PIF
3). EXIT TO DOS.PIF

THANKS A LOT FOR YOUR HELP...!
SAMMY. ;-)

***

Answer : A PIF is a Program Information File. Windows creates one when you run a DOS app under Windows. It is used to store information about the DOS program's environment (like the fact that you went to the properties of the DOS app's window and set it to "Close on Exit" - it will remember that next time thanks to the PIF file's storing that choice). You can also use it to directly launch the DOS app.

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities

Rating : 5


----------------------------------------------------------------------
QAId : 3085825
Asker : amerneimer
Subject : help me
Private : No

Question : how do i return to windows from a dos A:/> ?

Answer : If exit doesn't work try:

C:
EXIT

**OR**

C:
CD \WINDOWS
WIN

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 3140411
Asker : elcharles
Subject : Batch Files
Private : No

Question : Can anyone tell me how to write a batch file that list the contents of a network drive, and send the results to a .txt file. Something like
I:\*.*/s>>text.txt will work but in a batch file format.
Thanks for your help.

Answer : Assuming your drive is mapped to I: as you indicate you can do it with this (just paste into a file and name it anything.bat - also I'm assuming you want a list of *everything* on the network drive, not just the root directory):

@echo off
dir i:\*.* /s /-p /a > c:\idrive.txt

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities

Rating : 4


----------------------------------------------------------------------
QAId : 3140526
Asker : travis10
Subject : running cd's in dos
Private : No

Question : Please could you tell me how i can run a cd in msdos (at the dos prompt) at the momemt i try to chande from drive c: to e:(my cd drive) and it says "invalid parameters", can you help???

Answer : You need a DOS CD-ROM driver - here's one:

http://members.home.net/iqueue/idecd.sys

Save this file to C:\WINDOWS

Now edit the file C:\CONFIG.SYS and add the line:

device=\windows\idecd.sys /d:cd01

Now edit the file C:\AUTOEXEC.BAT and add the line:

\windows\command\mscdex.exe /d:cd01 /l:e

Now when you reboot just press F8 right before the boot starts from the hard disk (you'll see a menu pop up) - select "Command Prompt Only" and when the boot is finished you'll be left at a DOS prompt and have access to your CD-ROM drive on letter E:

One thing - you may not want to have this permanently in your hard drive's configuration as these are real-mode drivers and will interfere with Windows's native 32-bit drivers. The best use for idecd.sys and the lines I gave you are on a bootable floppy disk that you use when you need the CD-ROM and DOS but don't need Windows. To use it this way just make a boot floppy by going to Start/Settings/Control Panel/Add-Remove Programs/Startup Disk. When the disk is done use notepad or another text editor to edit the same files I listed above and put a REM at the beginning of all the lines like:

device=\whatever\this.sys

becomes

REM device=\whatever\this.sys

and then add the lines I told you about above...

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 3149852
Asker : 95sextond
Subject : MS DOS
Private : No

Question : What are the limitatins of MS-DOS?

Answer : There are lots...

no large memory access
no multitasking
no built-in networking
no true scripting language (BAT files are OK but lack some features)

Was there anything else specific you wanted in terms of limitations?

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 3166646
Asker : Anonymous
Subject : ms-dos
Private : No

Question : I go to start, programs, ms-dos,which comes up. But when i try to go to c: nothing happens, it stays c:/Windows.How can i get into c:/?

Answer : When you initially load the DOS prompt your "current directory" is C:\WINDOWS. DOS maintains the current directory for each device on your system. A: has one, D: (CD-ROM or second hard disk partition) has one too. Examine if, while in your DOS session, you perform the following commands:

C:\WINDOWS> CD SYSTEM
C:\WINDOWS\SYSTEM> A:
A:\> cd STUFF
A:\STUFF> C:
C:\WINDOWS\SYSTEM> A:
A:\STUFF>

Note that in the last two commands I changed from drive A: to drive C: and my path upon arriving in C: was the *same as I'd left it*. Also when changing then from C: back to A: again the current directory was made to be the same as I'd left it. This can be useful if you need to copy some files and are aware of this behavior. For example let's say I have some files in A:\WHAT\WHERE that I want to copy to C:\STUFF\MORESTUFF\YETMORESTUFF - there are several ways I can go about it:

*The bulletproof method*
A:\> COPY A:\WHAT\WHERE\*.* C:\STUFF\MORESTUFF\YETMORESTUFF

*The Tricky Method That Uses What We Discussed*
A:> CD \WHAT\WHERE
A:\WHAT\WHERE > C:
C:> CD \STUFF\MORESTUFF\YETMORESTUFF
C:\STUFF\MORESTUFF\YETMORESTUFF> COPY A:*.* .

The last line above will copy "*.*" from the *last directory we were on in drive A: because we did not use a full pathname*. Since we didn't include even a "\" (like A:\) this means to DOS to take the files from whatever the current directory was, which in this case we left at A:\WHAT\WHERE.

On another note, much closer to your question (:-) the "\" signifies the "root" of a disk. In your question you wanted to know how to go from

C:\WINDOWS

to

C:\

To get to the root of *any* device you simply do this:

C:\WINDOWS> CD \
C:\>

And there you are...

--
Paul Doherty
http://members.home.net/iqueue


Rating : 5


----------------------------------------------------------------------
QAId : 3253763
Asker : sammy_lb_2000
Subject : delete command
Private : No

Question : Hello everyone,

can you please tell me if there is a dos
command that would delete a specific file
from the c:\ drive without knowing the name
of the directory that is copied in.
thanks a lot for your help...!
sammy. ;-)

***

Answer : Use my program RDelete off my web site -

For example to remove the file stuff123.txt from your system (regardless of directory) you can issue:

rdelete c:\ stuff123.txt


Be aware that if there are any other files on the C: drive with this exact same name they will be deleted too... if you can isolate the branch of the filesystem somewhat you can mitigate that if you know there may be more than one of these files (unlikely by the way you've described it). For example say that you knew the file would exist somewhere in the "\WINDOWS" branch of the filesystem you could do:

rdelete c:\windows stuff123.txt

RDelete and other utilities of my design are available (as emailware) at my website:

http://members.home.net/iqueue

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities

Rating : 5


----------------------------------------------------------------------
QAId : 3345721
Asker : Anonymous
Subject : Dos -V- Win95/98
Private : No

Question : What advantages does the CLI interface of MS-DOS have over the GUI of Windows 95/98.

Answer : DOS lets power users get at and see everything in a "cleaner" format than Windows.

It also allows you to easily script activities to automate them. For instance I used to have a script I wrote called UNDO.BAT that would assist in getting at files I'd downloaded as ZIP/ARC/LZH archives. Invoked as:

undo file1 zip

it would do the following:

take me to a temporrary directory under my new downloads (C:\NEW\TEMP)

remove all files and dirs currently there

extract the filename I supplied (file1) regardless of extension (would use the right program) into the temporary directory from the download dir C:\NEW

display a dir after extraction

So all that is done with one command from any directory on the machine. It's that kind of scripting ability that keeps me coming back to a DOS prompt even today in 98 and ME...

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities

Rating : 5


----------------------------------------------------------------------
QAId : 3345793
Asker : great_goddess
Subject : DOS
Private : No

Question : What are Wild Card Characters?

Answer : Wildcard characters stand for other characters in a file or directory name.

As razara said there are two - the ? and the *

A ? represents a single character (and nothing but a single character).

So if you had the files:

STUFF.TXT STUFF1.TXT STUFF2.TXT STUFF3.TXT STUFF31.TXT

and you peformed this command:

DEL STUFF?.TXT

you would be left with:

STUFF.TXT STUFF31.TXT

Since the first one has no character in the "?" position (being after "STUFF" and before the period (".") and STUFF31.TXT has *two* characters after "STUFF" and so is not a match.

If you instead issued the command:

DEL STUFF*.TXT

you would be left with:

(nothing)

since all files match this wildcard. An "*" means "zero or more characters" and so match all the files we had.

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 3345837
Asker : hcyphers
Subject : Printing
Private : No

Question : I have Windows 95 but have a program that I must run that will not run properly under Windows. I must restart in MS-DOS mode. Then the program will not print on my Canon BJC-1000 printer, even after changing to a generic (text only) driver. Neither will other prgrams such as DOS Edit program. I put print.com from a machine running DOS 6.3 or 6.something on the WIN 95 machine and tried to run it. I got a "Wrong DOS" message. What can I do?

Answer : If the machine is hooked straight to your parallel port (likely) try testing the printer with this from pure DOS mode:

COPY C:\AUTOEXEC.BAT LPT1:

(you may have to press the page eject on the printer since a formfeed will not be sent)

Or try this:

EDIT C:\AUTOEXEC.BAT

and hit ALT-F and go to Print.

If these work then printing in the DOS program will just be printing to LPT1:

--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 3473896
Asker : marc94
Subject : Slow down System for older DOS applications
Private : No

Question : I need a tool who speeds down my PC because I need to run older DOS apllications and I always got the answer RUNTIME ERROR R006.
Thank you for your answers!!!!

Answer : You haven't given me enough info to comment on your run-time error (have you got the needed memory manager(s) loaded for your program?) but here are some utilities for slowing down your machine:

Bremze:

http://ansis.folklora.lv/bremze/

Moslo:

http://www.hpaa.com/moslo/


--
Paul Doherty
http://members.home.net/iqueue





----------------------------------------------------------------------
QAId : 3484965
Asker : albia
Subject : DOS Commands
Private : No

Question : I need some help in ascertaining the correct syntax for some DOS commands - I am reading a text book but cannot check my answers/ideas without a true DOS machine:)So any pointers or corrections would be appreciated:) Thanks for your time!

C:\>DEL D:\UTIL\NORTON\.
* does this cmd remove all the files from the sub-directory NORTON?- which is necessary to do before being able to remove the directory and it's parent?

C:\>RD D:\UTIL\NORTON
*and then

C:\>RD D:\UTIL
*isn’t this the correct syntax to use to remove the UTIL directory from the D: drive? Or is RMDIR more correct? are there any other cmds that can more efficiently acomplish the same thing? (in Ver 3-5)

C:\> DEL D:\BUS\PROJ\*.* ECHO Y | DEL .
C:\>DEL D:\BUS\EXER\*.* ECHO Y | DEL .
C:\>DEL D:\BUS\ASG\*.* ECHO Y | DEL .
C:\>RD D:\BUS\ASG ECHO Y | DEL .
C:\>RD D:\BUS\EXER ECHO Y | DEL .
C:\>RD D:\BUS\PROJ ECHO Y | DEL .

*I need to remove a branch from the root directory here and I want to be as efficient as possible - have I used the ECHO cmd with the DEL & RD cmds correctly? Or do I have the syntax incorrect? I thought that having the ECHO cmd means that you skip the confirmation prompt. OR - if I just remove the ECHO commands is it ok? Because the DEL cmds will delete the files in the three subdirectories and the RD cmds can then remove the directories.

- also...
what other cmd will duplicate the one below which wil show - one screen at a time - the C drive's parent directories, sub-directories adn all the files in them?:

D:\>DIR C:\ /P/A/S

-how do I set up a printer queue?

-what is the syntax for removing and adding to the prit queue in one go? IE - if I have already set up the print queue, and there is a queue for printing some files in the C drive directory called MARKETING and I want to remove a file called SALES.LTR from this print queue and add a file called SALES.SEP to the queue...how can I accomplish thta in one line?

D:\> PRINT /D:PRN C:\MARKETING\SALES.LTR /C C:\MARKETING\SALES.SEP /P

- If there is a parent directory on the C drive called BUSINESS that contains 6 sub-directories and there are files everywhere in the structure - how can i copy the entire structure onto the B drive using 720k unformatted disks ony?
Format B:/F:720 \v
ATTRIB +A C:\BUSINESS\*.* /S
XCOPY C:\BUSINESS\ B:\BUSINESS\ /M/S/E/V

Answer : C:\>DEL D:\UTIL\NORTON\.
* does this cmd remove all the files from the sub-directory NORTON?- which is necessary to do before being able to remove the directory and it's parent?


---

It removes all *files* from D:\UTIL\NORTON but does nothing to any subdirectories that may exist inside of it. DELTREE (since DOS 6?) does this for you (removes the whole branch).

****************************************

C:\> DEL D:\BUS\PROJ\*.* ECHO Y | DEL .
C:\>DEL D:\BUS\EXER\*.* ECHO Y | DEL .
C:\>DEL D:\BUS\ASG\*.* ECHO Y | DEL .
C:\>RD D:\BUS\ASG ECHO Y | DEL .
C:\>RD D:\BUS\EXER ECHO Y | DEL .
C:\>RD D:\BUS\PROJ ECHO Y | DEL .

*I need to remove a branch from the root directory here and I want to be as efficient as possible - have I used the ECHO cmd with the DEL & RD cmds correctly? Or do I have the syntax incorrect? I thought that having the ECHO cmd means that you skip the confirmation prompt. OR - if I just remove the ECHO commands is it ok? Because the DEL cmds will delete the files in the three subdirectories and the RD cmds can then remove the directories.

-----

The correct syntax for what you are trying to do here (using the first line as an example):

C:\> ECHO Y | DEL D:\BUS\PROJ\*.*


****************************************

- also...
what other cmd will duplicate the one below which wil show - one screen at a time - the C drive's parent directories, sub-directories adn all the files in them?:

D:\>DIR C:\ /P/A/S


-----

You have about the only one that will do it - another way is very similar:

D:\> DIR C:\ /A /S /-P | MORE


The "/-P" diables waiting per page and we then direct our STDOUT to the program "more" which just does the same thing - show a page at a time. A useless example that just goes to show there's more than one way to do things... but hey you asked. :-)


*********************************

- If there is a parent directory on the C drive called BUSINESS that contains 6 sub-directories and there are files everywhere in the structure - how can i copy the entire structure onto the B drive using 720k unformatted disks ony?
Format B:/F:720 \v
ATTRIB +A C:\BUSINESS\*.* /S
XCOPY C:\BUSINESS\ B:\BUSINESS\ /M/S/E/V


-----

There is no DOS command that I remember that will span disks this way. If you assume the directory structure will fit on the device you're using (be it a 720K, 144MB floppy, a ZIP drive, another hard disk, whatever):

XCOPY C:\BUSINESS\*.* B:\BUSINESS\*.* /E

This will create the dir structure "BUSINESS" on drive B: and will copy the full contents (including all subdirectories) to it.


--
Paul Doherty
http://members.home.net/iqueue




FUQuestion : THANKS so much Paul. yours has been the most helpful answer so far. Thank you for your time and not asking me a bunch of unrelated questions:) - from a grateful student of DOS and fellow Irish descendant:)

Answer : You're very welcome!

Don't forget to rate your answers on AskMe.com... we really do appreciate it!

--
Paul O'Doherty (Used to be anyway ;-)
http://members.home.net/iqueue

FUQuestion : ok - I would like to give you a top rating but I still need info on how to set up a print queue and to know if D:\> PRINT /D:PRN C:\MARKETING\SALES.LTR /C C:\MARKETING\SALES.SEP /P will work to remove one file from the queue and slip in another one in one line:)
Cheers!

Answer : Man, you want everything! :-)

http://www.csulb.edu/~murdock/print.html

I never had a need or opporutunity to use print much... I always just hammered it to LPT1:


copy c:\autoexec.bat lpt1:


--
Paul Doherty
http://members.home.net/iqueue

FUQuestion : Bet you're sorry that you ever tried to answer my question now hunh! :) hee, hee... I make you work for your rating!! - but I have learned not to jump the gun and rate answers when communicating is done.

I have a link to the site you referred to and it is what helped confuse me.

According to the examples given at the end of the webpage <http://www.csulb.edu/~murdock/print.html>
the command line below would get rid of sales.ltr from the queue and add sales.sep to the queue, which is what I want to do - BUT when I have read the details of the switches - it doesn't make sense! because it says "A filename already in the print queue that precedes this option will be suspended. Names of files (already in the print queue) that follow this option will be canceled." - well sales.sep follows the the /C option so doesn't that mean it will be cancelled and not the sales.ltr????

D:\> PRINT /D:PRN C:\MARKETING\SALES.LTR /C C:\MARKETING\SALES.SEP /P

I have no idea what this does--> copy c:\autoexec.bat lpt1:---I guess it copies that file to the printer drive? - is this another way of issuing a print command?

AND FINALLY- I am writing a batch file that requires I set up a print queue for printing on LPT1 - so all I have to do is type PRINT /D:LPT1 ?right?

ok - that's it! you've been great!
Cheers!


Answer : Here is what I get from the syntax help. To add sales.rep and delete sales.ltr in one command:

print /D:PRN c:\marketing\sales.sep /c sales.ltr

The first one comes before the "/c" (cancel) switch and is therefore added; the other comes after the "/c" and is therefore removed.

You're welcome and so have you!

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5

FUQuestion : ThanX to your guidance I got an A on my paper!
wa-hoo!!
If you are ever in Vancouver (Canada),
let me know and I will take you out for a Guiness!! :)
Cheers!
Albia...xxx
albia3@yahoo.co.uk
End :


----------------------------------------------------------------------
QAId : 3485244
Asker : nsddfran
Subject : what is the dos command to provide a date-stamp to a file, with an example
Private : No

Question : What dos commands can I use to provide a date-time stamp to a file created in a script.

Answer : Use my free (emailware) app - DateIt... Just copy it to C:\WINDOWS\COMMAND and then from any of your batch files that need a timestamp just execute DateIt somewhere in the file like this:

(beginning of your BAT file is a good place)
@ECHO OFF
dateit

DateIt will create a file in the current directry whose name is the current date - that way you will know every day the BAT file ran successfully simply by looking for these datestamp files.


http://members.home.net - DateIt is in the Windows Utilities section of the main page.

--
Paul Doherty
http://members.home.net/iqueue


Rating : 5


----------------------------------------------------------------------
QAId : 3494913
Asker : Anonymous
Subject : Display: page vs screen
Private : No

Question : Ok - so I am reading my text book and BAM! I realise that there is something that doesn't make sense! and I have been playing around with the commands through the DOS prompt in WIN98, and I still can't figure this out! So I thought it was time I asked for some help! I have lurked here a bit and am happy to finally have my own question to post:)

So listed below are the two questions, followed by my answers - BUT I have been trying to work this out and I can't figure out what the difference is! A text file doesn't have page breaks like a *.doc will have right? so displaying the file one page at a time is the same thing as one screen at a time - isn't it??

Q1* Issue TWO seperate commands that will display, ONE PAGE AT A TIME, the content of a file (on the A disk) called F-1.TXT which is located in a sub-directory called C-1, under the parent directory called P-1.

C:\>type a:\p-1\c-1\f-1.txt | more
C:\>more < a:\p-1\c-1\f-1.txt

Q2* Issue TWO seperate commands which will display, ONE SCREEN AT A TIME, the content of a text file called LTR.SEP, which is located in a directory called PR on the C drive.

C:\>type c:\pr\ltr.sep | more
C:\>more < c:\pr\ltr.sep

H-E-L-P!!:)

Answer : Stop hurting yourself... your answers are right (if not perfectly efficient).

All you're doing in both cases is getting input to the "more" program, which as you know, displays text a page ("screen") at a time. In the first case you use a text-spitter-upper (technical term for "type") and pipe it's output to the STDIN of more. in each of the second examples you simply execute more and redirect input (this is where the small inefficiency is - no need for redirection here - the commands are fine as):

C:\>more c:\pr\ltr.sep

Have fun!

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 3584383
Asker : ashrafks
Subject : ms-dos
Private : No

Question : I want to write a ms-dos batch file
which can rename a file with computer system date.
eg: ren myfile.bat f201099.bat if the system date is 20/10/1999. Please help me.
Ashraf

Answer : I can write you an app that will do that - I have a similar app called DateIt on my website that you may be able to use to get close to what you want - DateIt will *create a new file* in the currecnt directory you run it from (the actual file can be wherever you like in your PATH - best spot is \windows\command).


--
Paul Doherty
http://members.home.net/iqueue

Answer : I wrote an app that can do this for you - get it here:

http://members.home.net/iqueue/DateSet.zip

Read the readme.txt for instructions...

Don't forget to rate the answers you receive on AskMe.com...

--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 3663328
Asker : icollaboDotCom
Subject : DOS
Private : Yes

Question : How can I use DOS to locate a file in a folder and rename that folder with a date and time stamp?

Answer : I saw your follow-up question to another expert and saw what you are after. I wrote you (and everyone else) a program to handle this problem. It's called DateSet and you can use it to obtain and use the system date in a DOS shell or BAT file easily. I just finished compiling it and putting it on my web site:

http://members.home.net/iqueue/DateSet.zip


--
Paul Doherty
http://members.home.net/iqueue

Answer : --

FUQuestion : I am not sure what is wrong but this is exactly what I need if I can figure this out.

I installed the .exe in my C:\WINNT\system32 and a test.bak file at C:\Documents and Settings\User 1\Desktop\pfboae.bak

I then ran the follwing bat file:

@echo off
c:\WINNT\SYSTEM32\dateset.exe
call c:\mydate.bat
ren C:\Documents and Settings\Bradley User 1\Desktop\pfboae.bak c:\pfboae.%MYDATE%

but I got the following error (windows 2000):

The syntax of the command is incorrect.

hmmm... please help....

FUQuestion : I am not sure what is wrong but this is exactly what I need if I can figure this out. This is actually what I ran...


I installed the .exe in my C:\WINNT\system32 and a test.bak file at C:\Documents and Settings\User 1\Desktop\pfboae.bak

I then ran the follwing bat file:

@echo off
c:\WINNT\SYSTEM32\dateset.exe
call c:\mydate.bat
ren C:\Documents and Settings\User 1\Desktop\pfboae.bak c:\pfboae.%MYDATE%

but I got the following error (windows 2000):

The syntax of the command is incorrect.

hmmm... please help....

Answer : You need quotes around your long filename - to the "ren" command it appears that you have appended multiple parameters instead of the two you are supposed to...

Here is how you will likely want it:

ren "C:\Documents and Settings\User 1\Desktop\pfboae.bak" c:\pfboae.%MYDATE%

And I don't think that will work as planned either since I do not believe the rename command can "move" a file at the same time. Better to do this:

c:
cd "\Documents and Settings\User 1\Desktop"
ren pfboae.bak pfboae.%MYDATE%
move pfboae.%MYDATE% \

OR move it first...

c:
cd "\Documents and Settings\User 1\Desktop"
move pfboae.bak \
cd \
ren pfboae.bak pfboae.%MYDATE%

--
Paul Doherty
http://members.home.net/iqueue




Rating : 5

FUQuestion : Well I got it working, if you done mind me asking how does that work.... as you figured oot i am now DOS expert.... but this is being used against a java program...

Answer : Quite simply - I make a system call to obtain the date, parse from it the data I want, and then write out the C:\MYDATE.BAT file with the lines you'll need to set the environment variable.

I'm glad my program is working for you... enjoy!

--
Paul Doherty
http://members.home.net/iqueue

FUQuestion : Mr.pauldoherty,

I have had your program work successfully in test 2 times, Once on Win 2000 and on Win 95. I am now on trying to install it on a Windows NT Server machine and having all kinds of problems. I have done the follwing:

1. Installed the DATESET.EXE into C:\WINNT\system32
2. I have tried to test the following code on the machine

dateset
c:\mydate.bat
ren C:\WINNT\Profiles\Administrator\Desktop\t.txt C:\WINNT\Profiles\Administrator\Desktop\t.%MYDATE%

3. The program is running throught the process the Dos output as I run the batch file resembles

C:\Byp>bypbkup.bat
C:\Byp>dateset
C:\Byp>c:\mydate.bat

When I run the following, I get an error message that:
"The syntax of the command is incorrect." It appears to be referencing "call c:\mydate.bat"

dateset
c:\WINNT\system32\dateset.exe
call c:\mydate.bat
cd c:\
ren C:\WINNT\Profiles\Administrator\Desktop\t.txt C:\WINNT\Profiles\Administrator\Desktop\t.%MYDATE%


Adding "c:\WINNT\system32\dateset.exe" provides the same results as the first scenario? Here is that batch file...


dateset
c:\WINNT\system32\dateset.exe
c:\mydate.bat
cd c:\
ren C:\WINNT\Profiles\Administrator\Desktop\t.txt C:\WINNT\Profiles\Administrator\Desktop\t.%MYDATE%

I am totally confused? HEEELLLPPPPPP!!!!

-Brad
Declined (Reason) : You asked this as a separate question and that is where I will address it. Note - if it worked twice it works. :-) The problems may be in Windows NT. Try using the exact same BAT file in the same location, changing a file in the same place/name as under 95. If it doesn't work then NT is the problem.


----------------------------------------------------------------------
QAId : 3670691
Asker : Anonymous
Subject : MS-Dos Help
Private : No

Question : Hi,

I have some perl files(.pl), and when I double-click on the file icon, the file opens with my Perl interpreter (C:\perl\bin\perl.exe) in MS-DOS Mode. Once the file is done, the dos prompt immediately closes and I can't read the output. Anyone know how to make it so the dos prompt don't close automatically when it is done? (I am running Windows 98)


Pok

Answer : Try executing C:\perl\bin\perl.exe from Start/Run and then with that DOS window active click the top-left icon and select Properies. At the bottom uncheck "Close on Exit".

--
Paul Doherty
http://members.home.net/iqueue

FUQuestion : The MS-DOS closes very fast so I can't get to the properties in the file menu. Is there another way to get to properites?

Answer : Hmmm... that may be the standard DOS prompt so you may be able to run it and set the poperties there and it will save it.

Another thing to try is to run the perl.exe command again as above except add the syntax help parameter "/?"

c:\perl\bin\perl.exe /? | more

Try that if the DOS prompt settings don't take.


--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 3670714
Asker : dpipper
Subject : Copy files from a ZIP to C:
Private : No

Question : Is it possible to copy files from a ZIP Disk in DOS to C: and still preserve the long filenames? Or am I asking a stupid question? Can I just copy or xcopy a directory to the C:, is it that simple?

Thanks

Answer : If your DOS prompt is from 95 OSR2 or later it should preserve the long filenames, so yes the xcopy method should work.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 4


----------------------------------------------------------------------
QAId : 3702024
Asker : irancg
Subject : copy in dos
Private : No

Question : hi
In dos I want to copy my entire "c" drive to a directory in my d drive.How can I do it?

Thank you for your answer:)

Answer : xcopy c:\*.* d:\cbackup\*.* /e /c /f /h

--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 3909262
Asker : mrstar
Subject : Adding a drive letter to dos
Private : No

Question : I installed a 4.3 Gb hard drive to a 486 motherboard. It formatted it into 3 partions so the system could read the full size. Now the system won't assign a drive letter to the cd because the default setting is E. How can I add a drive letter for the cd-rom?

Answer : Try putting the line:

LASTDRIVE=F

in C:\CONFIG.SYS and rebooting...

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5
End :


----------------------------------------------------------------------
QAId : 3909289
Asker : pardi
Subject : dos
Private : No

Question : I have forgotten how to do this but I have done it in the past.If I am writinf a bat file that in volves formatting a diskette I have to be able to automatically (without keyboard intervention) respond "Y" to the question "Is it ok to proceed "plus others questionsHow do Ido that .Thank you.

Answer : You can accomplish this with:

echo y | format a:


OR


format a: /u /autotest


Neither will stop for an answer...

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 3909310
Asker : Anonymous
Subject : Closing multiple MS-Dos windows using a BAT file
Private : No

Question : I currently have two sessions of MS-Dos running showing data from my database and application server. I currently close these sessions using the X button on the title bar. Is there a way to close these two sessions using a separate BAT file?

Answer : Yes - try my app KillTask on my website below - you can use it to stop almost any Windows app from a BAT file or the command-line.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 2


----------------------------------------------------------------------
QAId : 3913088
Asker : simbo_x
Subject : i need commands on command promt
Private : No

Question : i need commands on command pront

Answer : If you want the commands you can use type this:

dir /w /o c:\windows\command

Use the commands you find there with caution - come can erase loads of data!

Before using any of the commands you find do this with each (using format as an example):

format /?

The "/?" will give you syntax help about the command and tell you it's purpose. here is the output from the above command:

C:\WINDOWS>format /?
Formats a disk for use with MS-DOS.

FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]
FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]

/V[:label] Specifies the volume label.
/Q Performs a quick format.
/F:size Specifies the size of the floppy disk to format (such
as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88).
/B Allocates space on the formatted disk for system files.
/S Copies system files to the formatted disk.
/T:tracks Specifies the number of tracks per disk side.
/N:sectors Specifies the number of sectors per track.
/1 Formats a single side of a floppy disk.
/4 Formats a 5.25-inch 360K floppy disk in a high-density drive.
/8 Formats eight sectors per track.
/C Tests clusters that are currently marked "bad."



--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 3945406
Asker : david_e_long
Subject : what dos v do you need to install 3.1
Private : No

Question : what dos v do you need to install win 3.1

Answer : I think anything from DOS 3.3 to DOS 6.2 will work fine...

--
Paul Doherty
http://members.home.net/iqueue

Rating : 4


----------------------------------------------------------------------
QAId : 4087393
Asker : pardi
Subject : follow up on dos
Private : No

Question :
Hi Paul

You earlier answered my question about how to automatically do a format without typing in to reply to the questions.
Format a:/u/autotest worked fine,do you have a variation for quick format?

Where do you find info like autotest?????

echo y | format a: didn't work (assuming that the line is a pipe}or am I missing something?

Similarily if I do a del *.* I must reply to the question "do I wish etc."
How do I automate that ?? .

Thank you..


Paul

Answer : "/autotest" is an undocumented feature, as is "/u".

/autotest means don't ask me any questions about the format, and /u means perform an unconditional format, ignoring whether the disk has a current filesystem or not.


echo y | format a: /u /autotest

The line above should work for you...


To delete all files:

echo y | del *.* >nul

The above line will delete all the files *and* be quiet about it... a good way to do these in a BAT file.

--
Paul Doherty
http://members.home.net/iqueue





----------------------------------------------------------------------
QAId : 4106456
Asker : mbuzi
Subject : Changing language in dos-mode
Private : Yes

Question : My Pc runs on windows ME. However I tried to reason as to why whenever I use dos mode the keyboard letters are german.

I changed the language at the windows Me to english USA but the dos mode won't change.

What do I do?

Answer : Try issuing this command after booting to DOS:

chcm 437

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 4130718
Asker : gdscore
Subject : Batch file with Win 98
Private : No

Question : I am running Win 98,using a batch file with several lines to back up several directories and "my documents" to a RW CD

The batch file line “ xcopy c:\mydocu~1/S/A e:\mydocu~1\ “copies only 2 of the subdirectories ( there are 9) but it copies all files not in subdirectories, all subdirectories and files in the 2 subdirectories it does copy.

Why will it only take two of the 9 subdirectories? It has been consistent with several minor variations.

Have no trouble copying and pasting the "My Documents" package but I want one iconed batch file to do it all so some of my less ---- partners can do a back up with one click.

Answer : Try it like this:

xcopy "c:\my documents\*.*" "e:\my documents\*.*" /e

One problem you had was using the "/A" switch as it copies only files that have the archive bit set, and that is why you are missing a lot of the files and dirs.


--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 4152680
Asker : subirp
Subject : copy files to c: with no OS installed
Private : No

Question : I formatted the hard drive.Then
I rebooted the system using a boot disk (with CD-ROM drivers intalled)and got to a:. I can also see the contents of d: (CD-ROM drive) I need to copy a setup of files (Actually, I have a windows 98 cd for which I need to copy the directory to c: and install the OS from there itself) to c: from CD-ROM and then run setup.exe from
the hard drive. I do not have any OS installed but am trying to install win95 OS. How can I copy list of files from CD to c: (with no OS installed) and then run setup.exe from c:/. Also, I tried to search for "copy.exe:
from another system (running win95)so that I can copy to a disk and then see if I can copy d: contents to c:. But could not find any file by that name. But the copy command still works from the DOS prompt. How does the copy command still works even though there is not copy.exe file in another win95 system.( I did a find on copy.exe and xcopy.exe).

Thanks in advance and feel free to ask quest. if I am not clear

Answer : You will use the following to get ready for installing:

(after booting from CD-ROM-enabled floppy)

C:
md 98kit
copy d:\win98\*.* 98kit
A:
sys c:

(for that last command to work you will need to get the command sys.com from C:\WINDOWS\COMMAND on another machine and put it on the floppy)

Then reboot the machine without the floppy (it will come up on the hard disk) and do:

cd \98kit
echo y | lock c: /off
setup

The reason "copy" works without there being a copy.exe file is an important concept to understand with DOS. There are two kinds of commands - internal and external. The program that gives you the command line to type your commands into (and that hosts programs) is called command.com. Commands you issue are parsed by command.com and then executed. Some commands are built into the command.com itself, so having a DOS prompt (meaning command.com is running) makes those commands available. Some of the internal commands always available are:

dir
type
copy
cd

Commands that are not internal are called external and reside in separate files. Examples:

xcopy.exe
format.com
sys.com
attrib.exe

and so on...


--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 4160018
Asker : rich0517
Subject : pause as a dos command
Private : No

Question : How do you enter a command that pauses a dos batch file for a specified amount of time before continuing without any user input involved?>

Answer : Here is a utility that will do it for you... just type:

sleep x

where 'x' is the number of seconds to pause.

ftp://ftp.digi.com/users/vijayk/Components/NT4.0/FEP5/Batch%20Files/sleep.exe


--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 4172864
Asker : goody1pk
Subject : dos
Private : No

Question : Is there any dos command to access cdrom? if any plz tell me in detail.

Answer : OK - Make a boot floppy (on your or another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now test the disk and ensure it boots and brings the CD-ROM drive up successfully as letter F.


--
Paul Doherty
http://members.home.net/iqueue

Rating : 3


----------------------------------------------------------------------
QAId : 4172877
Asker : goody1pk
Subject : dos commands
Private : No

Question : Can u tell me that how can we access cdrom after formating hard disk drive
without startdisk or bootable disk.

Answer : OK - Make a boot floppy (on your or another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now test the disk and ensure it boots and brings the CD-ROM drive up successfully as letter F.

--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 4172913
Asker : ru4reele
Subject : dos cd rom driver
Private : No

Question : i have repartitioned, and reformatted the harddrive, and cannot find a dos based cd romm driver, and there for the cd rom wont work, so that i can load windows,

i ahve the windows startup disk that i used to reformat and repartition,

do you know where i can download or if i should have a cd driver on the windows startup disk, and how to access it

i also have a cdromgod5.5 program
and i cannot figure out how to use to fix my problem...

Answer : OK - Make a boot floppy (on another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now you will have a bootable disk that will bring up your CD-ROM as drive letter F: - the best thing to do at this point in your reinstall is NOT to launch the install, but rather ensure you have XCOPY.EXE and XCOPY32.EXE on the floppy or in the C:\ directory and do an xcopy of all the files in the Win98 subdirectory off the CD to your hard disk and perform the installation from *there*. Why? A couple of reasons - one is the installation goes faster from the hard disk, but that's a minor reason. The primary reason is that after installation you will no longer be bothered by that annoying 'please insert your Windows 98 CD' when upgrading drivers, installing new versions of DirectX, etc, since all the source files for the OS are on your disk. The XCOPY command looks as follows:

(boot from floppy and format the hard drive

a:
format c:
sys c:

if necessary - be sure you have a backup first of whatever you want to keep!)

xcopy f:\win98\*.* c:\win98kit\*.* /e

Now boot off the hard disk and do:

cd \win98kit
echo y | lock c: /off
setup


--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A.Sc., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 4188351
Asker : Anonymous
Subject : Downloading DOS 5.0
Private : No

Question : I need to find a place where I can download DOS 5.0 disks.

Answer : http://www.myshed.net/sanx/windows9x.html

--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 4239725
Asker : ynotkel
Subject : reformatting....
Private : No

Question : Good Morning All...

Quick query for today.

How come when I reformatted my disk, I never had to reinstall dos, but a friend of mine who is in the process of formatting now appears to have lost all dos as well as windows. We think that this is true, as when we turn the computer on now, it doesn't even get a "c"-prompt. When trying to start from 3 (!) boot discs, it does nothing. We followed the exact proceedure as when doing mine and our operating systems are (for all purposes) identical.

I guess the only pertanent question at the moment is: How do we fix the problem??

Thanks in Advance,

Dave

Answer : I would suggest the reason you got different results is that you formatted like this:

format c: /s

and he didn't. The "/s" parameter adds the system files to a formatted disk right after formatting. This creates the bootblock and copies over command.com, io.sys and msdos.sys, making the disk bootable. This procedure is equivalent to running a SYS on the drive at a later time (which I suiggest you do now to fix it). Make a boot floppy on another machine:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\command\sys.com a:\

now boot on his PC from this floppy and run:

sys c:

and he now has DOS on his machine. If you want to format *and* add Windows to his system follow these steps instead:

OK - Make a boot floppy (on another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now you will have a bootable disk that will bring up your CD-ROM as drive letter F: - the best thing to do at this point in your reinstall is NOT to launch the install, but rather ensure you have XCOPY.EXE and XCOPY32.EXE on the floppy or in the C:\ directory and do an xcopy of all the files in the Win98 subdirectory off the CD to your hard disk and perform the installation from *there*. Why? A couple of reasons - one is the installation goes faster from the hard disk, but that's a minor reason. The primary reason is that after installation you will no longer be bothered by that annoying 'please insert your Windows 98 CD' when upgrading drivers, installing new versions of DirectX, etc, since all the source files for the OS are on your disk. the XCOPY command looks as follows:

(boot from floppy and format the hard drive

a:
format c:
sys c:

if necessary - be sure you have a backup first of whatever you want to keep!)

xcopy f:\win98\*.* c:\win98kit\*.*

Now boot off the hard disk and do:

cd \win98kit
setup


--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities

Rating : 5


----------------------------------------------------------------------
QAId : 4253689
Asker : irancg
Subject : opening a dos file
Private : No

Question : Hi
when I tried to open an application file in dos
this message was appeared:inter directory for nlib200.rtl ....what should i do?

Need More Information : Can you give me the error message in whole as it appears? And describe how you "tried to open" it.

FUQuestion : The file name is"ff.exe"
I tried to open it by typing its name and pressing enter.(in dos)
The message in whole is exactly:
"enter directory for nlib200.rtl (enter to quit):"
In windows when I tried to open it by double clicking on it a black window opens and the same message was appeared.

Answer : It sounds like it wants a run-time library (RTL) that was supposed to be in the directory where the program is installed. I'd suggest you dig out the floppies or CD you installed the program from and copy that file to the installed program directory. or if you suspect you have the file somewhere on your system do a Start/Find/Files or Folders and type in the filename and search from C:\ on down.


--
Paul Doherty
http://members.home.net/iqueue

Rating : 4


----------------------------------------------------------------------
QAId : 4261095
Asker : Neil321
Subject : Files that I cannot run
Private : No

Question : Paul,
I wonder how I can run certain files which are “flagged” and when
Clicked on ask for you to pick a program to open them?
Some of these I have down loaded and so am not surprised with
But others are internal of Win98. They all display [ well the JPEG I had inserted here in Word did not copy into the online space]
It is probably well known but I can only call it a flag -- as one waving in the air.


and look like this I can not locate a program which will open and run them other than Quick View which works ok on textual material as what I have here but only generates code when I try to get it to read/run certain other material, i.e., graphics for instance.
Thanks Neil321

Need More Information : What file extensions can you not open properly and want to be able to open?

--
Paul Doherty
http://members.home.net/iqueue

FUQuestion : Sir:
I have just looked for the offending extensions and these include the following:
.log, .prx, .cpe, .amp, .tmp, .cnt, .oem, .bin, .org,
in gathering them I wondered if they were not files which MS or others simply didnot want the end user tampering with?
Others arrive from ZD and other sites on downloaded material which is supposed to run on Win98 OS (or so I understood).
I see that the "flag" that I referred to is the Microsoft logo.
I have read through some of your Hardware responces and wish tell you --- Thanks!they are very informative. And yes , do rate them. The Archives are a real source of knowledge in themselves.
NeilMurphy

Answer : I totally agree about the archive of questions and answers - it's part of the reason I'm so active on Askme.com.

As for your file extensions. I don't see a single one of those that is normally a file for an end-user to use (executable, data of some sort to be viewed, image, etc). Some of the ones I know off the top of my head (what their purpose is):

.TMP - Temporary files that applications use. These are usually binary and contain nothing of use to a user. They should not be associated with any program (and thus will not do anything when double-clicked).

.BIN - usually a data file for a program.

.LOG - Windows and apps can keep track of status and error messages in these log files. For example you may see that in C:\ you have a SCANDISK.LOG - to associate the file extension .LOG with a text viewer (since .LOG files are text) you can open your My Computer to the C: drive, then click once on scandisk.log, then hold the SHIFT key down and right-click on scandisk.log which will add another item to the menu "Open With" - select that new menu item and choose Notepad from the list of programs. Also make sure the checkbox at the bottom "Always use this program to open this file" is checked and from then on any file ending in .LOG will open with Notepad when double-clicked.

You can use that technique to change any file extension, but unless you have a good reason to change one that's already in place (as opposed to adding a new one like we did with .LOG) I'd suggest that you not do it.

If instead you have lost the ability for shortcuts themselves to work, see this document for the steps to fix it:

http://support.microsoft.com/support/kb/articles/q172/0/53.asp

If you're associations are seriously out of whack I'd suggest backing up your current registry and restoring from a backup. Windows 98 keeps backups automatically (I know what you were thinking - "I don't have a backup!" hehe). If you want to do this let me know and I can help you with it.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 4294576
Asker : flynns13
Subject : dos
Private : No

Question : how do i shut down all running applications in dos without rebooting?

Answer : Is this a trick question or something?? Unless you are running TSRs (Terminate and Stay Resident) there is only *one* program at most running at any given time in DOS. If you're at the command prompt and aren't running TSRs then you *have* shut down all running applications (except for the command processor itself (command.com), but without that you wouldn't be in DOS).

To check for running apps type:

mem /c /p


--
Paul Doherty
http://members.home.net/iqueue



----------------------------------------------------------------------
QAId : 4312119
Asker : Anonymous
Subject : connect (dos)_pc to a windows_pc; access (dos)_pc hadr drive
Private : No

Question : I have 2 computers. The 1st pc only works in the DOS mode. The 2nd pc works in either windows98 or DOS mode. I want to access the 1st computer's hard drive and transfer a file from it to the hard drive on the 2nd computer.
How do I do this? Please list hardware needed, DOS commands needed, and detailed procedure.
Thank You.

Answer : If the file(s) are too large to ever fit on removable media like floppies do this:

1) get a null-modem serial cable (with proper ends for each machine's serial ports - the newer should have a 9-pin serial port (DB-9), the older may have a 25-pin serial port (DB-25). Be sure to match the gender for the cable correctly (i.e. both will be female in gender so a male to male cable will be needed).

2) Download this file to a pair of bootable floppies and boot each machine to DOS and type:

xport

and follow the prompts. This utility will automatically setup a serial connect between the two systems and allow you to navigate from one the other's disk contents and transfer it easily.

http://members.home.net/iqueue/xport.exe


Alternatively you can simply disconnect the hard disk from the old box, plug it in as a secondary drive (set as "slave"), boot the new machine and then copy the files from C: to the other drive letter.

--
Paul Doherty
http://members.home.net/iqueue


Rating : 5
Rating : 5


----------------------------------------------------------------------
QAId : 4332169
Asker : patmcgee
Subject : Off-center display in DOS and startup
Private : Yes

Question : I've got a problem that seems to be DOS-related. For some time now I've been having a problem with the screen display for my PC. (My system information is included at the bottom of this message.)

At startup and when in full screen DOS mode, the screen display (including DOS messages and startup logo) is shifted to the left. So DOS messages can't be read, the "C" in Compaq is at the left edge of the screen, and there's a black band 2 inches wide along the right side of the screen.

But once the Windows desktop screen comes up, and in any Windows application, the screen seems perfectly centered, so I've been able to ignore the problem. But now I need to be able to work in full-screen DOS mode some of the time and I can't see the commands I'm typing, error messages, etc.

I've had the PC for 18 months and the monitor for 12 months and this problem didn't develop until a couple of months ago. I'm not sure exactly when it developed since I normally leave my PC on standby when I'm not using it and rarely shut it down. So I'm not sure what software or hardware addition may have contributed to this. I've checked out the Troubleshooting Wizards (for DOS and for display) at support.microsoft.com but this problem wasn't covered there.

I'd appreciate any suggestions you have for a fix or for other online resources (including other help sites if this is not the best one for this question). Thanks, and happy holidays and a great new year.

Pat McGee
patmcgee@yahoo.com


SYSTEM INFORMATION:
PC: Compaq Presario 5204
Memory: 64MB 100mhz SDRAM
BIOS: Compaq 11/11/98
OS: Windows 98 (4.10.1998)
Processor: AMD-K6-2 (346 mhz)
Display Adapter: Rage LT Pro AGP 2X
Hard drive: 4GB Ultra DMA
Monitor: NEC MultiSync 90 (19")

Answer : I know exactly what the problem is... it is merely a difference in refresh rates for the DOS-mode screen that is causing it to display off-kilter. Different resolutions, color depths and refresh rates call cause different signals to be sent to a monitor. The reason your Windows is centered is either because you got lucky and the monitor and video outputs were already in sync at that res, or you set it once and forgot you did it. DOS runs in a completely different resolution, color depth and refresh rate, so the fact that it is not centered as well as the Windows screen before adjustment comes as no surprise to me. Try using the horizontal adjustment on the monitors control front panel and move it into view. If your monitor is new enough it may remember the new centered position automatically, or it may have a "store" button or similar that will allow the same.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5
End :


----------------------------------------------------------------------
QAId : 4349549
Asker : savannah5
Subject : corrupted win95/dos?
Private : Yes

Question : My PC is now misbehaving.

When I boot it up, it goes to the start-up menu even without pressing F8! and at the bottom of the start-up menu there's this message

"The following file is missing or corrupted C:WINDOWS\HIMEM.
There is an error in your config.sys on line1..."

Now it can't load win95,and I need to send e-mails to friends this christmas.

Please help!

NB: At the dos prompt,when I edit c:windows\config.sys I get the message "BAD COMMAND" . I get the same message when I type scanreg\restore at the dos prompt.

Answer : Sounds like your CONFIG.SYS has an error in it - you can either fix the contents (using edit or another method I'll show you since your edit seems to be missing) or just rename the files config.sys and autoexec.bat as they are not really needed. To rename do this:

c:
cd \
ren config.sys config.bak
ren autoexec.bat autoexec.bak

That should remove at least part of the errors and let you get into Windows.

If you want to fix the contents:

c:
cd \
type config.sys
(note what is right and what is wrong)
copy con config.sys
(WARNING this will write over the existing file so make sure the lines of the original are visible)
now enter in each line from the original config.sys one at a time, making sure each line is right, then hitting ENTER. When done with all lines hit CTRL-Z on a line by itself and then ENTER.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 4353950
Asker : mbuzi
Subject : STEPS TO RESTORE WIN95
Private : Yes

Question : My PC has now started behaving badly(PII 466 MHZ, RAM 32, HDD 4.33MB (55% FREE)

When I boot it,it takes me to the "STARTUP MENU FOR MICROSOFT WIN95"

Here there're five(5) options given:
1. NORMAL STARTUP
2.LOGGED
3.SAFE MODE
4.STEP BY STEP e.t.c

When I choose any of the above, It takes me to the command prompt ALWAYS.

What can I do to the Pc so that I get my win95 running? Could it be a virus problem?

NB: It has the latest F-SECURE antivirus definations, but as it is now, it's useless. I also have the start up diskette for the win95.

Please help!!

Answer : Try typing

win

and hitting ENTER at the prompt after booting in "Command Prompt Only" mode.

Also if that doesn't work send me the output from this command:

type c:\msdos.sys > c:\result.txt

Email me the c:\result.txt file...

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5


----------------------------------------------------------------------
QAId : 4374134
Asker : Anonymous
Subject : What DOS Commands?
Private : Yes

Question : Hi
Do you know what DOS commands would help me toget into Windows98, from the DOS mode?
I recently 'crashed' my system, and used my emergency disk...but can't get out of DOS.
I HAVE WIN98, COMPAQ PRESARIO 5360,10GB HARDRIVE, 90 RAM, AND 450mhz.
I tried the menu options, and hit 'enter'...but it won't go to Windows....only for a millisecond, then returns to the menu...SHOWING ME A dos prompt.
I can access prompt for 'C' or 'A', AND virtual CD DRIVE 'E'.
The windows98 CD I have is only the second edition...and says I need Windows to run it.


Answer : What happens when you boot from the hard disk?

If you want to try and recover from a crash that has disabled Windows do the following:

Boot from the boot disk then:

path=a:\;c:\windows\command
C:
cd \windows
attrib -r -h -s *.dat
ren system.dat system.bak
ren system.dat system.bak
ren system.ini sysini.bak
ren win.ini winini.bak
cd sysbckup
dir *.cab
(look for the newest file listed - that is the most recent date of creation - we'll assume the newest file was named RB001.CAB)
extract /e rb001.cab
attrib -r -h -s *.dat
move system.dat ..
move system.ini ..
move user.dat ..
move win.ini ..

What we have done here is to take advantage of the fact that Windows 98/SE takes periodic backups of the registry. We have taken the latest version of those backups and reinstated that backed-up version.

Reboot the machine and see if the sitation has improved. If it hasn't you can repeat this process with successively older versions of the registry backups. If you decide that you are not getting anywhere and the problem lies elsewhere you can put the original versions you had back in place with this:

path=a:\;c:\windows\command
C:
cd \windows
attrib -r -h -s *.dat
copy /y system.bak system.dat
copy /y user.bak user.dat
copy /y sysini.bak system.ini
copy /y winini.bak win.ini

If these steps don't help you your problem may be file-related - meaning you may have the wrong version of a critical file, or there has been corruption of a critical file. Try holding the CTRL key during a boot and when the menu appears choose a "Logged" boot. After the boot is completed you can examine the bootlog.txt file for some more clues as to what you are facing.


--
Paul Doherty
http://members.home.net/iqueue



Rating : 5

FUQuestion : Hi Paul. Happy New Year...almost,
Well, Paul I did follow your excellent instructions, and got to view my five rb001-005 files and repeated the process five times as you suggested.The earliest cab file was 21 Dec ...a day before I installed the suspect software ,so I thought this would work....but no,
It didn't solve the problem, so I 'put the originals back'
Upon rebooting (without the emergency disk), it comes to the 'C'prompt.....
I did the CTRL key for the boot and went to 'logged' but it came back to the prompt, without any logged file to read.
A mystery.
At one point previously when following the procedure it said'file not found user bak 0 file copied'
The others it copied ok.
I am still game to try something else, if i can avert the reformat, and hassle of reinstalling all the software.
Chris

Answer : Windows keeps a copy of the *very first* system.dat on your hard disk for just such an emergency. It's stored on the root of C: as a file named system.1st and is hidden away. If you want to try an extreme step (you should since you're hosed anyway at this point) go for this:

Use the method I described above backup your current system.dat and user.dat.

Leave the user.dat alone - do not replace it with a backup

Perform the next lines:

attrib -r -h -s c:\system.1st
copy /y c:\system.1st c:\windows
c:
cd \windows
attrib -r -h -s system.cb
copy /y system.ini sysini.bak
copy system.cb system.ini

Now reboot and your PC will go through the process it went through one it's very first boot! This may solve your problem, but in doing so it may cause you to lose some upgraded drivers for some of your hardware. If Windows *does* prompt you for some hardware drivers you can either point it to C:\WINDOWS\SYSTEM when asked since the files all still really exist it's just that Windows is unaware of them due to the original registry being put in place, or better still you can ignore the request for drivers momentarily (noting what devices need drivers either by these requests or by going to Start/Settings/Control Panel/System/Device manager and looking for red/yellow flags) and go get the latest drivers for audio, video and network devices from:

http://www.winfiles.com/drivers

If after a boot and driver adds you still have no luck you can get back to where you are (but why would you want to? :-) with these steps:

c:
cd \windows
attrib -r -h -s *.dat
copy /y sysini.bak system.ini
copy /y system.bak system.dat
copy /y user.bak user.dat (I know we didn't do this one but it may have been altered during your "first boot" proceedings)

Congratulations - you now know more about Windows than you ever wanted to know!

--
Paul Doherty
http://members.home.net/iqueue

Answer : One other thing...

Please refrain from asking private questions unless the subject really is private. No one else can ever read our interaction because of that, and that detracts from the value of the site and our interaction. Part of the reason I answer questions here is to build of a knowledge base of answers - even I can't get back to this question or find it once we're done.

FUQuestion : Hi Paul,
Excellent instructions,and I am learning heaps of stuff.
Regarding the procedure to go back to the 'system 1st'.The message comes up 'cannot find file system 1st', so of course, I am short on options , I imagine.
I may have to use the two CD's Compaq provides called 'quick restore'. which it is...except for the oodles of software and updates, which takes forever.
Unless you can think of anything else?
hAPPY nEW yEAR!

Answer : You may have not gotten the attrib command correct. Try this and see if you see the file:

dir /a c:\system.1st

If the file is listed it's there. I'd be very surprised if it were gone since by default it is marked as system, hidden and read-only.

Remember to issue the command:

attrib -r -h -s c:\system.1st

before trying to copy it over the system.dat


End :


----------------------------------------------------------------------
QAId : 4377925
Asker : chxq99
Subject : .class files
Private : No

Question : Dear all,

Recently I have opened a .class files by notepad. Since then, whenever I downloaded software that contain .class files, all the files are appeared in a notepad icon. Would you please tell me how to restore them in their original icon?

Regards,

Christine

Answer : To change the association for any file extension:

Open an explorer window so you can see one of the files of that type.

Left-click the icon once to select it.

While holding the SHIFT key right-click the icon and a new item will appear in the menu (Open With). Select that menu item.

Select the application you want to handle that extension (ensure that the check box at the bottom is selected so the selection is permananent) either in the list or by browsing to the EXE for that application.

--
Paul Doherty
http://members.home.net/iqueue

FUQuestion : Dear Paul,

Thank you very much for your prompt response to my enquiry. However, my problem is I don't know which application should I use to convert (handle) the .class files into their original icon. Do you have any suggestions?

Cheers,

Christine

Answer : Generally that extension is unused - it would seem you may be using a compiler like C++ that uses class modules? If that is the case then the .class module should probably open into your compiler's IDE (Integrated Development Environment) where it can be edited. There is no harm leaving it associated with notepad or wordpad if those are preferred for edits.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5

Answer : Ah I see some of my esteemed colleagues remembered better than I that .class files are Java files. In any event that helps you know which program to associate the .class files with - the Java interpreter.


----------------------------------------------------------------------
QAId : 4433616
Asker : sammy_lb_2000
Subject : Setting dos colors on-the fly in windows 98se
Private : No

Question : Hello everyone,

can you please tell me how to set the colors in
DOS shell on-the-fly, for the background and
foreground? i have been trying with the command
prompt $e[1;32;42m, but it works ONLY inside the
config.sys file.
thanks a lot for your help...!
sammy. ;-)

***

Answer : Hopefully you know that the reason you are not seeing colors (probably) is that you need to load the driver ANSI.SYS in your CONFIG.SYS:

device=\windows\command\ansi.sys

Then the prompt is set in the autoexec.bat:

PROMPT=$e[44;37m$p$g$e[40;37m

(a space is present at the end, just after the '37m')

This will make a nice white on blue command prompt that shows your current directory. And any time you want to change it you can from a DOS prompt or a BAT file the same way:

PROMPT=$e[43;31m$l$t$g $p$g$e[40;37m

(again a space at the end, and one after the '$g')

This prompt will be red text on a yellow background, and will include the current system time at the beginning of each prompt, giving you a clock of sorts.

If you decide you like the color changes and want to use them on the full screen, just leave off the last background reset like this:

PROMPT=$e[44;37m$l$t$g $p$g

(another space at the end)

Now type:

cls

and hit ENTER...

--
Paul Doherty
http://members.home.net/iqueue
Rating : 5

Answer : Oh and if you'd like to lose the hundredths of a seconds display, make that last example look like this:

PROMPT=$e[44;37m$l$t$h$h$h$g $p$g

(again a space at the end)

--
Paul Doherty
http://members.home.net/iqueue
Home of PC DiskMaster and DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 4433705
Asker : Anonymous
Subject : MS-DOS Prompt
Private : No

Question : I am trying to run a program from MS-DOS Prompt, however it says file not found.
I typed in C:\Folder>program/levelfile<levels.txt>
I am sure my files are there so what am i doing wrong?

Answer : My esteemed colleague Ram80 may be on the right track but he has his order of execution wrong - the order that DOS will seek out and run a filename is:

COM
EXE
BAT

That is, if you had three files in the directory in which you are residing all of the same name (MyFile.COM, MyFile.EXE, and MyFile.BAT) the order in which they would be found and run is the order I showed above.

The other thing I think I have rooted out of your question that may have confused Ram80 (as it did me) is that the "/"s you used were not part of the pathname but were being used as switches as they should be (but you didn't separate them with a space as you should have, both here and on the command-line).

Anyway, on to your question. Since you didn't show the actual path you were using and instead showed placeholders (why did you do that anyway?) I'm going to suggest that perhaps you are attempting to access an executable that does indeed exist, but is in a path with a space in the name. For example if your EXE were stored here:

C:\PROGRAM FILES\MYAPP\MYAPP.EXE

you would need to access it from DOS in this fashion:

"C:\PROGRAM FILES\MYAPP\MYAPP.EXE
(you can include the last quote if you like but it will work without it)

The double quote lets DOS know it can ignore normal delimiters like space and tab keypresses. Without the quote DOS will be confused by what it sees as multiple command-line arguments being supplied, namely:

C:\PROGRAM

and

FILES\MYAPP\MYAPP.EXE


--
Paul Doherty
http://members.home.net/iqueue
Rating : 4


----------------------------------------------------------------------
QAId : 4433733
Asker : gdscore
Subject : DOS BATCH FILES
Private : No

Question : How can I enter a line in a batch file so that it will open a directory window (win 95/98) in the same drive as the batch file?
George Daniels

Answer : You can do this with no problems. Include the following in your BAT file (included a few example lines to show I can be in different directories):

@echo off
c:
cd \windows\system
start explorer .
pause
cd \
start explorer .

Enjoy!

--
Paul Doherty
http://members.home.net/iqueue
Home of PC DiskMaster and DOS/Windows Utilities
Rating : 5
Rating : 5


----------------------------------------------------------------------
QAId : 4434418
Asker : Anonymous
Subject : a dos question
Private : No

Question : a while ago I discovered that you could make directories inaccessible to people who don't know how to use DOS. here's how: you either rename or create a directory with the null (ALT+255) character then when you try to access it through windows it can't be found, moved or renamed... now here's my question: I'm a lazy person so I want to be able to make a batch file that will rename the null directory to a reguler one but when I try to do it it says "file not found - [the null directory]." Is this possible to do?

Answer : You certainly can, but as someone mentioned your choice of editor may limit the use of those extended characters. Try it the hard-core way like I do - don't use any editor at all! This is the failsafe method of creating files that is highly useful since not everyone has a text editor in their DOS (or it may become damaged, or you boot from a rescue floppy and don't have edit.com handy, etc). I like techniques like this because I always want to be able to get things done, even under the worst of circumstances.

To create and test what you're trying to do I did the following (anywhere you see *255* in the following that indicates where the ALT+0255(on the keypad) has been typed and where you should type it to get the same result - "^Z" means press CTRL-Z - it will terminate the file (it's the EOF character (End Of File)):

c:
cd \
md temp
cd temp
md *255*
cd \windows\command
copy con open.bat
@echo off
c:
cd \temp
attrib -h *255*
ren *255* visible
cd visible
dir /w /o /p
^Z

copy con close.bat
@echo off
c:
cd \temp
ren visible *255*
attrib +h *255*
cd *255*
dir /w /o /p
^Z

--
Paul Doherty
http://members.home.net/iqueue
Home of PC DiskMaster and DOS/Windows Utilities
Rating : 5


----------------------------------------------------------------------
QAId : 4434537
Asker : Anonymous
Subject : how to figure cd-rom in dos environment?
Private : No

Question : I am trying to figure our cd-rom drive, writing something in config.sys and autoexec.bat. I forgot what I should write. how to write the driver of sys in config.sys and use mscdex.exe in autoexec.bat?

Thanks!

Answer : Download the following file (if you don't already have a DOS CD-ROM driver):

http://members.home.com/iqueue/idecd.sys

Copy idecd.sys to C:\WINDOWS

Now create a config.sys as follows:

edit C:\CONFIG.SYS

The config.sys needs the following in it:
device=c:\windows\himem.sys
REM Above line is optional
device=c:\windows\idecd.sys /d:cdrom001

Save the config.sys

Now edit C:\AUTOEXEC.BAT and put the following in it:

@echo off
c:\windows\command\mscdex.exe /d:cdrom001 /l:f
c:\windows\smartdrv /n c+ f 4096 4096
REM Above line is optional

Save the file and exit.

Your CD-ROM should come up as drive letter F: after a reboot.

--
Paul Doherty
http://members.home.net/iqueue
Home of PC DiskMaster and DOS/Windows Utilities




Rating : 5


----------------------------------------------------------------------
QAId : 4487904
Asker : swshomer
Subject : background is priting
Private : No

Question : I just started printing from my new adobe photoshop 6 and the printer is printing a verly noticeable grayish/blue background on the paper that represented the white area of the window i print from. even when i make the background transparent. it happens on any photoshop images. i opened an image in microsoft's paint program and printed the image with no printer ink on the paper. Any ideas? Thanks, steve

Answer : Very odd - first thing I'd suggest is that maybe the background in Photoshop is not a *pure* white. In other words - you may be in a high color mode and have something very close to pure white but not, and the printer driver is trying to print something as close as possible to what's on the screen. Just an idea. If it's not this make sure you have the latest drivers for your printer.

http://www.winfiles.com/drivers

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4499646
Asker : jmccown
Subject : dos commands
Private : No

Question : what dos command string do i use to back up a hard drive to a cd rom drive (cdrom rw)?

Answer : You can't backup a hard drive to a CDRW from DOS without 3rd party tools. You can't even copy files to a CDRW from DOS without 3rd-party tools (Adaptec DirectCD can create a drive letter (eg "X:") that can be written to like any other disk after a special format is applied to a CDRW but whether that letter can be hit inside a DOS prompt I'm unsure of).

One that does do hard disk backups to CDR(W) from DOS is TakeTwo by Adaptec - it comes with Easy CD Creator Deluxe 4.0

http://www.roxio.com/en/products/ecdc/index.html

--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4507561
Asker : doug_coughler
Subject : Terminating a process in a batch file
Private : No

Question : I've asked thiss in the general forum as well. I've got a batch file that launches an application. I want to be sure that the application is terminated before proceeding to the next step. Is there any way to close an app from within the DOS batch file? I thought TASKMGR might do it, but I had no luck. I'm running on WinNT.

Answer : Try my free utility KillTask. I don't remember if I tested it in Windows NT or not, but it allows you to kill any running Windows app from a command-line or from within a BAT file.

http://members.home.net/iqueue


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

Rating : 5
End :


----------------------------------------------------------------------
QAId : 4526195
Asker : doug_coughler
Subject : Any way to end task from within a DOS batch file on WinNT?
Private : No

Question : I want to ensure that a program called from within a DOS batch file is terminated. Is there any way of doing this? I'm on WinNT 4.0.

Answer : Under NT you have some other options. There is a utility called kill.exe (and the remote version rkill.exe) - it may be in the NT Resource Kit or on the main install CD. Another that may come in handy is tlist.exe which will list out the tasks on a system. For example:

Use tlist to see the processes on your system:

tlist

Once you get the PID (Process ID) for a process (open a Notepad before you run tlist and kill it) you want to kill then kill it with either kill or rkill:

kill pid

rkill /kill \\servername pid

You can also use rkill to view the processes on a remote machine (first install the rkillsrv.exe as a service on that machine):

rkill /view \\servername

You can use these tools in your BAT file to uniquely locate a process by name and then kill it.

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 4526226
Asker : Anonymous
Subject : Boot error message
Private : No

Question : Here is the error message when I try to boot up with a certain update softpaq disc from my computer's manufacturer:

BOOT: Couldn't find NTLDR
Please insert another disc

What does this mean? It is a Compaq

Answer : Assuming you are not concerned with having NT on this machine anymore (it had it on at least once - the source of your message) create a boot floppy in Windows 98 (Start/Settings/Control Panel/Add-Remove Programs/Startup Disk tab). Then boot from this disk and then issue the command:

fdisk /mbr

This will restore a 98-compatible Master Boot Record and you will not receive this error message again.

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Answer : On second thought you may want to also execute the following command at the same time:

sys c:

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 4
End :


----------------------------------------------------------------------
QAId : 4527261
Asker : sirkevin
Subject : Dos issues
Private : No

Question : Hello,

I have partition magic 5.0. My os is Win 98 se. I used it about 3 months ago when i first got my box and it partioned fine. Now I go to resize a partion and everything is okay until it goes into dos to the work. The computer restarts (which it should) then a message comes up. "would you like to return to windows to continue runnung windows program" if I hit no it just gives me a c prompt (no partion work) If I hit yes it restarts and then brings me back to the same message. I have to manually go into the config.sys and delete the statement dos=single (which pm puts there) just to get back in windows. Is there something I need to do to not get that choice message and let pm do its thing.

Thanks

Answer : Does PM finish it's work and successfully resize the partition? If so then try this to straighten out the disk so it will boot. Create a boot floppy on a 98 or 98SE box (Start/Settings/Control Panel/Add-Remove Programs/Startup Disk tab). Boot from this disk then type:

fdisk /mbr
sys c:

Now try rebooting and see if the message continues.

--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 4542983
Asker : OClee
Subject : Exit
Private : No

Question : Hi,
I am currently trying to write a simple batch file that copies a number of files this works my problem is that the DOS box wont close on its own I have used the command exit at the end of the batch file and still no joy. Any ideas?? ... It is to run on a Win98 machine.

thanx

Answer : Run the batch file one time, and with the DOS windows still open click the icon at the top-left corner of the DOS window and select Properties. Then check the box at the bottom that says "Close on Exit". From then on when the exit is reached in your BAT file the DOS window will close. While you're in there you may want to set the window position to Minimized so the window will only show in the taskbar when the BAT file is run.

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 4549270
Asker : cadonn
Subject : Get DOS to accept or recognize Unix commands
Private : No

Question : Is there a program that will let DOS accept or reconginze UNIX commands. Thought I saw a download somewhere that will allow this to happen.

Any ideas?

Cathy

Answer : Try here:

http://www.geocities.com/SiliconValley/Lakes/1401/unix.htm

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 4562793
Asker : rcalde2044
Subject : MS DOS
Private : No

Question : HOW DO I BEBUG A HARDDRIVE TO REMOVE NTFS DRIVE FDISK DID NOT WORK

Answer : Do NOT low level your drive - there is no need (and IDE drives are not intended to ever be low-leveled). FDISK does not understand NTFS partitions and thus cannot remove them. Here is an extremely easy utility that does understand them and will remove them (and any other partition type).

ftp://ftp.ncd.com/pub/ncd/Archive/WinCenter/Utilities/delpart.exe

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 4676477
Asker : wanderace
Subject : dos version
Private : No

Question : How do I find what version of dos my computer is running. I am running windows 95a and was just curious?

Answer : Open a DOS prompt (Start/Programs/MS-DOS Prompt) and type:

ver

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4676500
Asker : Anonymous
Subject : How to create a current time text file in batch"
Private : No

Question : I want to Create/Name a file on their timestamp(Time of creation) in the Dos Batch file. How I can do this?

Answer : Download my utility DateIt - it will create a file that has as it's name the day the script was run. Just copy it to a dir in your path (like C:\WINDOWS\COMMAND in 95/98/ME or WINNT\SYSTEM32 in NT/2K) and then use it from any batch file like:

@echo off
dateit
REM Do my stuff here...
REM

http://members.home.net/iqueue/#DateIt

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4676524
Asker : dblconstruction
Subject : ms dos comands
Private : No

Question : I'm having trouble with the correct dos commands I need to re-install my cdrom and windows.

Answer : OK - Make a boot floppy (on another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now you will have a bootable disk that will bring up your CD-ROM as drive letter F: - the best thing to do at this point in your reinstall is NOT to launch the install, but rather ensure you have XCOPY.EXE and XCOPY32.EXE on the floppy or in the C:\ directory and do an xcopy of all the files in the Win98 subdirectory off the CD to your hard disk and perform the installation from *there*. Why? A couple of reasons - one is the installation goes faster from the hard disk, but that's a minor reason. The primary reason is that after installation you will no longer be bothered by that annoying 'please insert your Windows 98 CD' when upgrading drivers, installing new versions of DirectX, etc, since all the source files for the OS are on your disk. the XCOPY command looks as follows:

(boot from floppy and format the hard drive

a:
format c:
sys c:

if necessary - be sure you have a backup first of whatever you want to keep!)

xcopy f:\win98\*.* c:\win98kit\*.*

Now boot off the hard disk and do:

cd \win98kit
setup


--
Paul Doherty, CNA, CNE, MCP+I, MCSE, A.A., B.A.
http://members.home.net/iqueue
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 4736407
Asker : Neeraj_Mittal
Subject : Size of file in DOS Batch
Private : No

Question : How can you do operations on other files by knowing their size in batch file?

E.g I am Ftping in a file through a batch file. I wan't to know the size of that file. if it is 0 then I will come out from batchfile

or

How can you know the size of text file in a batch?

Answer : Try my utility FileZero - it can ascertain whether a file is 0 bytes in length and report that into your BAT file so you can act on the information. Full docs and an example of usage are in the readme.txt file.

http://members.home.net/iqueue/FileZero.zip


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4816554
Asker : tevisokc
Subject : Remove MS Dos Prompt
Private : No

Question : I created a MS Dos batch file to delete all files
in c:\temp directory. I'm running Windows 98. How do I turn off the prompt "Are you sure (Y/N)?" when the batch file is executed ?




Answer : echo y | del *.*

OR

del *.tmp

(since you only stated you are deleting TMP files)


--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities


Rating : 5


----------------------------------------------------------------------
QAId : 4816566
Asker : undagroundmansion
Subject : boot floppy
Private : No

Question : Hello, I was wondering if someone could make a win98 boot floppy with a driver file i ned put on there and i do not understand how to do it

Answer : OK - Make a boot floppy (on your or another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now test the disk and ensure it boots and brings the CD-ROM drive up successfully.

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 4860864
Asker : undagroundmansion
Subject : DOS "MSCD001"- just formatted
Private : No

Question : Hello, I recently formatted my hard drive..When i load up from a boot disc (after i pick "start with cd-rom support") it says "Device Name :MSCD001" then "Device drive not found, aborting installation" i think i need MSCD001 drive but i am not sure// could someone please help me? i am desperate i have been working on this for hours on end.. please reply on a easy way for my solution or if i could chat with someone on a chat prgram, thankyou

Answer : Edit both the:

a:\config.sys
a:\autoexec.bat

Check to be sure that the same device name is referenced on all lines that either load a driver (config.sys - DEVICE= lines) or that load the CD-ROM extensions (autoexec.bat - MSCDEX.EXE line). The device parameter will look like this:

/D:MSCD001

The name "MSCD001" has no significance whatsoever. You can call it GOOFY if you want - it just needs to be the *same* in all places of both files. Your problem likely stems from the name being different in one file.

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 4879151
Asker : trinhngoclinh
Subject : Assign current date to a variable
Private : No

Question : Dear expert,

(urgent!)

I writing a batch file in which I need to get the current date and set it to a variable. My purpose is to create a new directory named after the current date,e.g Feb28, automatically in batch mode .
How can Iget the date and assign the date value to create a variable ?

Many Thanks,
TrinhNgocLinh@usa.net


Answer : Grab my utility DateSet from:

http://members.home.net/iqueue

It will allow you to do whatever you like with a variable that will be assigned the current day's date.


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

FUQuestion : Dear pauldoherty,
(Urgent!)

I have downloaded the Dateset.zip but I am unable to UNzip the file, I think there is some error with the ZIP file. Please do a check.

Many thanks
Linh

Answer : The DateSet.zip file is fine as-is on the website. It was made with a newer version of WinZip so make sure you have the latest WinZip installed.

http://www.winzip.com


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

FUQuestion : Thanks to your utility I can complete my batch.
However I think that something more you can do to enhance the utility.
If the date (or Month) has one digit, the DateSet utility returns the date of today: 01, March 2001 in the form of __1032001__ (in stead of 01032001)
This format, i.e __1032001__, could be wrongly interpreted 10 March, 2001.

Please rewite the utility so that it always returns the date in a fixed format of 2 digits for date and month. For date or Month with 1 digit, the utility should add a digit of 0 .
If possible, you could modify Dataset in such a way that it can accept date format parameter.
Let say when running DateSet ddMMMyy it returns MYDATE=01MAR01. That is beatiful.

I bevile that it is easy for you.
Please inform me if you have a newer version.
Have a nice day.
Thanks and regards,
Linh


Answer : You're very welcome! I'm glad the utility helps you to complete your project.

I didn't realize there was any issue (didn't test with all months - just the current one when I wrote it). Next time I'm poking around in the source I'll have a look at it.

Don't forget to rate the answers you receive on AskMe.com - we like to know if we helped.


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

Rating : 4
End :


----------------------------------------------------------------------
QAId : 4898529
Asker : trinhngoclinh
Subject : Assign current date to a variable
Private : No

Question : Dear experts,

(urgent!)

I writing a batch file in which I need to get the current date and set it to a variable. My purpose is to create a new directory named after the current date,e.g Feb28, automaticaly in batch mode .
How I can get the date and assign the date value to create a variable ?

Many Thanks,
TrinhNgocLinh@usa.net


Answer : Download my utility, DateSet from my website below. I created it expressly for doing this, and it will work fine in your BAT files.


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4898593
Asker : classicgto1
Subject : thanks-res. meter: Now 3.11 question
Private : No

Question : Actually this is a Win 3.11 question: where can I find it? It is one of the OS's their teaching in the A+ Certification class I'm taking. This is the last class covering 3.11 so I need to know it for the CompTIA tests. Next semester class will cover Win 98 and Linux and some of NT, not 3.11. So, can you send me 3.11 (if you have it) or where can I find it so I can install it on my old practice computer so I can know the basics about it to pass the A+ Cert test.
Thanks for your help, Jim
classicgto1@juno.com

Answer : There are several for sale on EBay cheap:

http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=windows+3.11

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 4906802
Asker : jdang
Subject : what cmd for dns lookup
Private : No

Question : what cmd for DNS lookup

Answer : nslookup is the normal utility for doing this. It comes with NT and 2K (and maybe ME) but not with 95/98.

You can either get a freeware/shareware utility that does the same thing from a place like:

http://www.winfiles.com

or you can use the poor man's version of nslookup - ping!

ping www.microsoft.com

Whether the ping succeeds or not you will do a DNS lookup of the name to IP. And there is your IP:

C:\WINDOWS>ping www.microsoft.com

Pinging www.microsoft.akadns.net [207.46.131.199] with 32 bytes of data:

Request timed out.

Ping statistics for 207.46.131.199:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms


--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 4916513
Asker : amy_lew
Subject : DOS Utility
Private : No

Question : Where do I find the DOS Utility EXE2BIN?

Answer : ftp://ftp.sunet.se/pub3/vendor/microsoft/Services/TechNet/Windows/msdos/RESKIT/SUPPDISK/EXE2BIN.EXE

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities

Rating : 5

FUQuestion : Do you know how to get an .EXE file from .ASM file using TLINK,then I have to convert it into a BIN file.I use TASM first creating the .OBJ It is a macro for a RISC, everytime I use TLINK,it gives the warning 'No Stack'.What is wrong? Can you explain Macros???
This macro will be programmed into an EPROM.

Answer : It's been too long since I used assembly. Check these for assistance (the "no stack" error is referenced here):

http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=35f411b21c60d720&seekd=935101149#935101149

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities





----------------------------------------------------------------------
QAId : 4929252
Asker : Anonymous
Subject : MS-DOS
Private : No

Question : Hi, I am having trouble with a question for school on DOS. The question is: First, Make Drive A: my current drive.......then Change the command prompt to show the current date and my last name on one line and the current path on the next line.

Could you please help me on this, I just cant seem to get it......I am using DOS 6.22
Thank- you

Answer : Assuming you have ansi.sys already being loaded in your CONFIG.SYS here's how:

PROMPT=$d LASTNAME$_$p$g

'$d' gives the date
LASTNAME is your last name
$_ is a CR (Carraige Return) and moves the cursor to the next line
$p is the current directory path
$g is the ">" greater-than symbol

--
Paul Doherty
http://members.home.net/iqueue
Home of DOS/Windows Utilities


Rating : 5
End :


----------------------------------------------------------------------
QAId : 4936477
Asker : Anonymous
Subject : MS-DOS
Private : No

Question : Hi, I am having a little trouble with a MS-DOS command, I am using version 6.22. I want to do a directory list but only show files that begin with "ST" and sort the files in reverse order by name. How would I do this? Thank you

Answer : dir st* /o-n

/o means "ordered" - by itself it will sort in alphabetical order

n means by name

"-" reverses the normal meaning of the next character, so causes the sort by name to happen in reverse order.

--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities
Rating : 5


----------------------------------------------------------------------
QAId : 4936556
Asker : marckus
Subject : using fdisk to partition
Private : No

Question : I've used fdisk to create 2 partitions on my hard drive. I create a primary DOS partition as my active, boot drive (c: drive). Then I created an extended drive and made it my logical drive. The problem is, fdisk made this new partition the D: drive and changed my CD-ROM to E: drive. But I'd like to keep my CD-ROM my D: drive and make this new partition my E: drive. Is there a way to change this back? Thanks for your help.

Mark

Answer : Yes you can change it. Open the System control panel, then go into the Device Manager tab. Open the CD-ROM section, double-click your CD drive, go to the Settings tab and under First Drive and Last Drive set it to F:

Now under the hard disk section of Device Manager do the same to the hard disk (IDE drive), only set it to E:. Reboot and when you get back up go in for the last time and set the CD-ROM to the now-vacated drive letter D: and reboot.


--
Paul Doherty
http://members.home.net/iqueue
DOS/Windows Utilities

Rating : 4

Answer : You may have to reboot after the first change (CD from E: to F:)


----------------------------------------------------------------------
QAId : 4966669
Asker : sukotto
Subject : using CD-rom when booting from floppy
Private : No

Question : I would like to use my cd-rom drive after booting with a boot-disk. anyone remember how to do that? I have MSCDEX.exe on the disk but can't remember (or find info on) how to use it.

I'm running Win95 (if it makes any difference).

Answer : OK - Make a boot floppy (on your or another Windows machine) as follows:

Start/Programs/MS-DOS Prompt

(put a blank floppy in the drive)

format a:

c:
cd \
sys a:
copy windows\himem.sys a:\
copy windows\smartdrv.exe a:\
copy windows\command\mscdex.exe a:\
copy windows\command\xcopy*.exe a:\
copy windows\command\format.com a:\
copy windows\command\edit.com a:\
copy windows\command\sys.com a:\

Download the following file to A:\

http://members.home.com/iqueue/idecd.sys


Now create a config.sys as follows:

edit a:\config.sys

The config.sys needs the following in it:
device=\himem.sys
device=\idecd.sys /d:cdrom001

Save the config.sys

Now edit A:\AUTOEXEC.BAT and put the following in it:

@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

Save the file and exit.

Now test the disk and ensure it boots and brings the CD-ROM drive up successfully as letter F.

--
Paul Doherty
http://members.home.net/iqueue

Rating : 5