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

Return to AskMe Archive Main Page

Return to Main PowerUsers.info Main Page

----------------------------------------------------------------------
QAId : 6865113
Asker : max1milion
Subject : Writing dos batch files
Private : No

Question : I want to write a batch file that uses a part of itself only if a variable has a certain content. If I simply enter into a batchfile

dir %1 /s

for instance, then the input to run the batch file at the prompt would be

batname searchterm

and it works fine. BUT, if I want to make the switch a variable it would look something like this

dir %1 /%2

and the prompt input would look like this

batname searchterm s

and IN THEORY it would work fine. BUT, if I want to use that batch file to run a search WITHOUT any switches, then it doesn't work, because it still puts in the slash. Example

batname searchterm

when using the batch code

dir %1 /%2

will produce

dir searchterm /

and screw up because of the erroneous /.

How can I set up my batch file such that it only puts in the / if there is a variable to follow it? Better yet, how can I tell the batch file to return some kind of an echo message if a variable's content is wrong? Is this even possible?

Any help would be much appreciated.

max@nerc.com

Answer : You can check for the second parameter like this:

@echo off
if '%2' == '' goto noparam
dir %1 /%2
goto exit
:noparam
dir %1
:exit

If the second parameter spot is empty you will perform the normal dir command; if it's not empty you will use the value there.

As for checking for legit values, you can do so with successive tests as above. For example let's say that only "a", "b" or "c" are to be accepted as valid entries for the second parameter position. You can then validate the input as follows.

if '%2' == 'a' goto valid
if '%2' == 'b' goto valid
if '%2' == 'c' goto valid
goto error
:valid
dir %1 /%2
goto exit
:error
echo You need to enter a second parameter of a, b, or c!
:end

*Any* successful test above short-circuits by jumping to the "valid" branch. If it gets past all the tests of valid parameters without a match then the error code will be executed. Be aware that you may want to test for BOTH lower and uppercase letters, like:

if '%2' == 'a' goto valid
if '%2' == 'A' goto valid

Have fun!

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

Rating : 5


----------------------------------------------------------------------
QAId : 6874120
Asker : Anonymous
Subject : Xcopy
Private : No

Question : How do use the xcopy dos command, that will alert me that floppy disk space has run out and to insert another disk to continue?

Answer : xcopy does that by default. Just issue a command like this with a blank floppy in the drive:

c:
cd \windows
xcopy *.bmp a:\

When the disk is full it will prompt you to put in another.

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

Rating : 4

Answer : What version of Windows or DOS are you using? Under Windows 2000 is automatically prompted me for another disk. There is no switch to cause it to occur so if your version doesn't work you may want to try and find a newer one on a search engine like google or ftpsearch.lycos.com.

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



----------------------------------------------------------------------
QAId : 6937276
Asker : Anonymous
Subject : DOS CD Command
Private : No

Question : I tried to run one of my programs (recommended by the software company) in DOS, but got the error message “invalid command”. I then tried to change directories with no luck, using the DOS CD command. I could not change to my “Program Files” directory using the syntax “CD Program Files” from my C:\ prompt, which is the next subdirectory above the C:\. I get the error message “Too many parameters”? I could change to the Windows directory just by typing “windows” but not anything else? Why? I'm running windows 98 se and restart in DOS mode to do this.

Russ



Answer : This problem stems from the fact DOS uses whitespace (spacebar press, tab character, etc) as a delimiter, which simply means spaces are a separator for DOS to distinguish between what is a command (cd) and what are the parameters that follow it (Program Files). The problem here is that the CD command's syntax looks like this:

cd <path>

("cd" by itself will show your current directory)

So the CD command expects only one parameter to be given to it - and that parameter should be a valid DOS path; either an absolute path like c:\dos\mystuff or a relative path (meaning starting from your currect directory on the filesystem) like dos\mystuff

What you told CD was this:

CD Program Files

Which in essence makes no sense according to the CD syntax above since there is a space between "CD" and "Program" and another between "Program" and "Files". So CD sees *two* parameters being given it instead of the single one it wants and dies. What you need is to force DOS to ignore the fact there is a space between "Program" and "Files" and to treat the space as a non-special character. This will defeat the normal delimiter function and allow the whole path to work as you intend. To do that we use double quotes around the item that contains a space:

cd "program files"

And voila! You are in!

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



FUQuestion : Paul,
Thanks for the reply. Tried your method, cd "program files" syntax. No such luck. Got error message, "no directory exists". In the process I did discover what does work. After running the DIR command I realized all my Windows 98se names are truncated under DOS. So, "program files" subdirectory really becomes "progra~1", which I can change to without quotation marks.

Thanks for the try,
Russ

Answer : It wasn't a "try", it was 100% accurate. It just doesn't apply in DOS mode outside of Windows. Try it yourself and see - if you type:

cd program files

you'll still get an error.

If you type:

cd "program files" it will work.

I'm glad you figured out that long filenames get truncated. You don't need to exit to DOS mode to run the app, however. Windows 98SE will run most DOS apps right inside a window. Open a DOS prompt (Start/Programs/MS-DOS Prompt) and cd as I showed you. Then run your app (can press ALT-ENTER to toggle between full screen and windowed).

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

Rating : 3
End :


----------------------------------------------------------------------
QAId : 6960520
Asker : whiplash415942
Subject : batch files
Private : No

Question : I have norton systemworks and I want to create a batch file that will run like say norton disk doctor,complete it,then run norton windoctor,complete it, etc.
but my batch files only open the interface, they don't start the program.I want to be able to run multiple programs one right after the other with no interaction from me. How do I do this?
thank you for your time.

Answer : Your apps probably are only opening and not acting because you're running them "plain". That is, without any parameters being given to tell them what to do.

To find the switches (parameters) your app supports:

http://www.symantec.com/search/

Type in:

command line switches

and hit ENTER. You can find out the switches for each app that way, or you can run the EXEs from a DOS prompt with a "/?" after them to find the switches, like:

ndd.exe /?

As for having your BAT file perform several of these tasks - you can run them one after another in the BAT file, but if you need for any of them to finish *before* running the next one (like a DiskDoctor to finish before a SpeedDisk defrag begins) you can use a utility I wrote called Sequencer, available on my website to cause your BAT file to wait until the apps you launch from your BAT file finish their work and close before going on.

--
Paul Doherty
http://home.attbi.com/~iqueue
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 6971248
Asker : brandonjohnson1
Subject : "End Process" Batch File
Private : No

Question : Hello All,

What is the command in a batch file to kill a process? The command needs to work on 9.x, NT or 2K machines. When an app freezes, I want to be able to run the batch, which will kill any remnant of the process and then restart.

Thanks!

Answer : For all three OS's my utility KillTask may help - http://home.attbi.com/~bitbucket911

For NT/2000 a utility called kill came with the Resource Kit - use another utility tlist to find the PID (Process ID) number of each task before killing it.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 6975234
Asker : pa.kinsella@...
Subject : renaming PC at Dos level
Private : No

Question : Hi,

Is it possible to change the computername at the DOS level, thereby alleviating the need to go into windows/network/identification and changing it there. I am imaging machines that are in the 98 platform. The most time consuming part is having to go round and rename all the PC's once the imaging is complete.

thanks

Pat

Answer : Here is a conversation I found on this subject where the person is using SysPrep with Ghost to image and give unique machinename/domain assignments with a quick BAT file.

http://groups.google.com/groups?hl=en&threadm=%23uZlQP54AHA.2016%40tkmsftngp05&rnum=1&prev=/groups%3Fq%3Dghost%2Bunique%2Bmachine%2Bnames%26hl%3Den%26rnum%3D1%26selm%3D%2523uZlQP54AHA.2016%2540tkmsftngp05


--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 6980596
Asker : Locii
Subject : Batch file
Private : No

Question : Hello all batch file gurus...
I collect text files in a directory. Periodically I need to append all these collected .txt files to a single master file. What I'm trying to do is come up with a batch file that will (1)append all collected .txt files to the master file (2)not overwrite files already in the master file (3)erase the collected .txt files from the directory. I've dinked around with the DOS command line "copy file1.txt+file2.txt+file3.txt c:\whatever\master.dat" Just don't know enough about batch programming to do the same thing with a batch file.

Any workable help will be appreciated.

Answer : In this instance we need to do more than one thing to each file in the directory - the first thing is to concatenate (append) it to the master file, and the second thing is delete each file as it's handled. So we need two BAT files in addition to the "for" command. We start with TEST.BAT, which will process all the files (I'm assuming TEST.BAT and NUKE.BAT are in the same directory with the text files - if not just put the full paths on each command, or a CD command at the beginning):

TEST.BAT

@echo off
for %%i in (*.txt) do call c:\windows\temp\test\nuke.bat %%i
ren newfile newfile.txt

Notice we use the "call" syntax since we need to execute a second BAT file from within the first. We also pass it the current filename as we run it.

Now here is the NUKE.BAT BAT file:

NUKE.BAT

@echo off
echo Got parameter %1 in nuke.bat
type %1 >> newfile
rem del %1

The "echo" line is for debugging and can be removed if you like silence. Also remove the "rem" from the last line to have it actually perform the delete of each file after it's been appended.

Note that after TEST.BAT has processed all the files through the for loop that it renamed the file NUKE.BAT was using the whole time as the repository for the files (which was avoiding using a .TXT extension since it would then be included in processing!) from NEWFILE to NEWFILE.TXT, completing the migration of the text from all the text files residing in the directory to this new text file. The file doesn't have to be new either, you can easily be appending to a continuous master file that doesn't even need to be in this directory; just change the path to NEWFILE in NUKE.BAT:

type %1 >> c:\wherever\masterfile.txt


My files in the beginning were 1.txt, 2.txt and 3.txt which contained the following:

C:\WINDOWS\TEMP\test>type 1.txt
sdafasd

C:\WINDOWS\TEMP\test>type 2.txt
zxsdds

C:\WINDOWS\TEMP\test>type 3.txt
dsgasagrwe

After processing, newfile.txt contains:

C:\WINDOWS\TEMP\test>type newfile.txt
dsgasagrwe
sdafasd
zxsdds

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



Rating : 5


----------------------------------------------------------------------
QAId : 6990535
Asker : ste_petrov
Subject : monitor driver
Private : No

Question : Hello,
Could someone tell me how to install
a monitor driver, which is an .inf file in DOS!
Thank you

Answer : That's not possible since a monitor INF file is not a driver, but just a text file containing the technical specifications of the monitor (horizonal and vertical sync rates, etc). All a monitor INF file does is tell Windows what the monitor can do, so Windows and the video card driver can calculate the proper resolutions and refresh rates for it.

DOS only uses its standard low-res screen until an *application* run on top of DOS (like a game) itself sets up the video card for a different resolution/color depth.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5

FUQuestion : That's the problem as it was.
There were several computers connected in a network. One of them was very old and by an unknown reason it was able to display only 16 colors. Through "Display properties" I decided to find a better driver trough the network in one of the others computers. After the restart the "old" computer displayed something in many colors (the screensaver)
but the image was composed of moving left and right lines. There was no way to guess what was actually on it. I've reinstalled Windows98, but the problem is still there.
Could you please explain what happened and if possible find a solution.

Best regards,
Stefan

Answer : The chances are good that you've selected a monitor INF file that no longer represents the true capabilities of your display. The symptoms you describe of a garbled screen would be consistent with a refresh rate beyond what the monitor can support. To change the monitor type or to change the refresh rate to something lower reboot in Safe mode (hold the left CTRL key during the reboot until a menu appears).

Safe mode will force you to boot in 16-color VGA mode where you can make the changes. Once in, go to Start/Settings/Control Panel and select the Display control panel. Go to the Settings tab and click thr Advanced button. Change the monitor type under the Monitor tab, and set the refresh rate under the Adapter tab. If the monitor were set correctly you would likely not have the problem you describe so I would verify the monitor type first. Also ensure under Adapter that you are using the right driver for your video card (at the top).

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

End :


----------------------------------------------------------------------
QAId : 7008112
Asker : sammy_lb_2000
Subject : Testing memmory in dos...
Private : No

Question : Hello paul,

can you please tell me how to test the computer's
main memory in the dos mode? Also, do you know of
any good Dos program that I can use to test the
memory for damage or defects?
thanks a lot for your help...!
sammy. ;-)

***

Answer : There are some memory testers here - I'm not sure which are the best. My favorite way to test RAM to see if it is what is causing problems is to:

Create a RAM drive using RAMDRIVE.SYS or similar that is the total size of the installed RAM minus about 512K-1MB (for your running DOS). Then once I've booted with that RAM drive configuration I then do an:

xcopy c:\*.* x:\*.* /e

to copy the entire C: drive to the RAM drive. Of course it will fill up in short order and abort, but that's just what you're looking for - a *clean* abort. If the system just crashes or hangs your RAM is likely suspect. If it gracefully tells you how dumb you are for trying to copy your hard disk to your RAM and allows you to "Abort, retry, fail" then your RAM is likely OK.

This was an even better diagnostic for the system I devised this test for - the Amiga - since it had a dynamically-allocating always-available RAM: device that only took up as much room as what was in it. It was nice for this test since the copy would literally fill all available RAM not currently occupied with running code, unlike this one that neglects testing under the 512K or 1MB barrier. Nonetheless this is a good way to test your RAM as chances are good (31/32 on a 32MB system and increasing as the size of your RAM increases) that the error is not present in that lowest 1MB of RAM.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7012336
Asker : schn20
Subject : Filename
Private : No

Question : Hi. Can anyone tell me how to make a file name in dos that contains a blank space. My teacher said that there is one way to do it. Thanks.

Answer : Sure thing - open a DOS prompt and type:

c:
cd \wherever
md hidden(ALT-0255)

where you see (ALT-0255) above is where you should press and hold the ALT key and then type 0255 on the keypad at the far right of your keyboard. let go of the ALT key and "space" will appear that isn't a space. To prove that all is right try CDing to the new directory:

cd hidden

It will fail.

Now try it like this:

cd hidden(ALT-0255)

and it should work.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : Thanks. Is this the same as saving a file with a space in it?

Answer : Not exactly, especially if you try to access the file or directory from DOS. In Windows it will appear as a blank space, and since Windows is handling the file/dir for you the effect is the same as a space. But in DOS you will not be able to access, say this file:

c:\my file

as "c:\my file"

since the user will be typing a space (ASCII value different than the 255 character we used). Their access will fail with a "Bad command or filename" and they won't know why.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : Right. But is there a way to save a dosfile with a space in the name? My teacher said that there is one way to do this only but he will not tell us how.

Answer : All you want is a space? hehe Talk about (me) overengineering the problem. I thought you were trying to be tricky.

Try:

md "stuff for me"
cd "stuff for me"

Enclosing it in quotes will do the trick.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5

FUQuestion : I just have one more question. I'm just in the process of learning dos right now, so please bear the dumb questions. When I'm making a directory like what you told me above, I'm also making a file?

Answer : A directory is just a special file, that can have other files associated with it (i.e. it points to all the files that are "in" the directory after which its named). A truly irrelevant (to any end-user or power-user) tidbit of info as it will never impact anything you do.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7020174
Asker : skyline77
Subject : how to?
Private : No

Question : how to inter to a certain folder in dos?
suppose the folder's name "aaa"
the line in dows appears like
D:\>WHAT SHOULD I WRITE???

Answer : cd aaa

Rating : 5


----------------------------------------------------------------------
QAId : 7028677
Asker : Sodea
Subject : File handles
Private : No

Question : I am using a dos application on Windows ME.
This application is two Databases which uses a software called DataEase, V4.53.

When after I open both databases and then try to access some data, I get a message " not enough file handles".

In the past, This would happen when we would install on a new computer, so we would go the the Config.sys and increase the number of handles to 200 and then everything would be fine.

On Windows ME the Config.sys is empty, and furthermore when I enter "Files=200" in config.sys and save it, it gets wiped out when I reboot the computer and the contents in config.sys goes to "0".

Can you help me increase the file handles to be able to use these applications?

Answer : As you've noticed Windows ME doesn't use the setting in the CONFIG.SYS - it's part of Microsoft trying to distance themselves from the DOS heritage of Windows 3.1/95/98/98SE/ME. The setting that controls the number of file handles in ME is kept in the C:\WINDOWS\SYSTEM.INI, under the [386Enh] section. If it's not already there add the line:

PerVMFiles= number

where number is 225 or less (gets added to the default 30 file handles for a maximum of 255).

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

End :
Rating : 5


----------------------------------------------------------------------
QAId : 7033868
Asker : Anonymous
Subject : Backup using DOS
Private : No

Question : I would like to backup a folder and its subdirectories using DOS batch command. The one thing i want to be able to do is back up the folder only if one of the files in it changes.

Here's what I have so far:

COPY H:\backup\email.zip G:\backup
COPY H:\backup\website.zip G:\backup

H: is a mapped directory on my laptop, G: is my backup partition.

Thanks for any help or suggestions.

Answer : To copy the whole folder and all its subdirectories you can use xcopy:

xcopy h:\backup\*.* g:\backup\*.* /e

This will get all files and folders from H:\backup

As for getting files after a change I can think of a few ways to approach that.

1) You can use the last changed date of the files to determine if they should be copied. Then you can copy files newer than the specified date. Do a:

xcopy /? | more

to see your syntax for the /D: switch as it differs slightly from different Windows versions.

2) Another way would be to use the archive bit that gets set by Windows/DOS anytime a file is modified. To do that include the /M switch on xcopy to have it copy only the changed files and reset those files archive bit:

xcopy h:\backup\*.* g:\backup\*.* /e /m

3) Do a:

h:
cd \backup
dir /s /a /-p > c:\before.txt

Now you have a directory listing of the full subdirectory structure, including file sizes. Later, when you want to test if a change has occurred (new file added, existing file changed size, etc) you can do this:

h:
cd \backup
dir /s /a /-p > c:\after.txt
fc c:\before.txt c:\after.txt

(note you will almost always see a difference in the summary information at the bottom where the free disk space for the whole hard drive is noted so ignore that difference)

If you see differences it's time to backup.



--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities







----------------------------------------------------------------------
QAId : 7033872
Asker : Modea
Subject : DOS variable in Windows2000
Private : No

Question : We switched from Windows 98 to Windows 2000 and two of the DOS batch files, that we need to run, are not working.

In both cases we are calling the batch from a procedure in a DOS database.

The procedure in the database is supposed to assign values to variables in the batch file.

Example of a batch file
pkzip %3 %2

The values that we are sending from the database are not being recognized. What can we do to solve this problem?

Thank you for your time
Maureen

Answer : More examples needed of both batch files, what you expect to happen, and what is happening.

FUQuestion : Hi Paul;

I may be able to explain it this way.
I have a Procedure that calls a batch file that zips files. The name of the .bat file is MBBundle.bat.
The procedure reads
call program jointext("MBbundle Accounts",t_filesuff) This returns call program MBbundle Accounts ZN0404
The Mbbundle.bat file reads pkzip %1 %2
So when the .bat file is called it would read
pkzip accounts ZN0404.

I hope this helps in your understanding of the problem and you know of a solution.
Thanks again for your time
Maureen

Need More Information : Copy and paste your two scripts into a reply and then show me an execution line.

Thanks

FUQuestion : The lines are exactly

The program line is
call program jointext("MBbundle Accounts",t_filesuff)

The execution line in the batch file is
pkzip %1 %2

I don't know what else I can tell you.

Answer : Instead of invoking the BAT file directly try invoking cmd.exe and passing it the path and name of the BAT file, along with the parameters.


----------------------------------------------------------------------
QAId : 7033879
Asker : Anonymous
Subject : Compiling Problem in GWBasic in MSDOS.
Private : No

Question : Hi there,

I have a problem in compiling an old .bas GWBASIC file of 72KB using QBasic 4.5. The error I am getting is "out of memory" & this is when I try to open the file in QBasic 4.5. This compiler includes Brun45.exe. I know the compiler works because I have successfully compiled smaller files. Also, the very same file has been compiled in the past by others. Can anyone advise how I should proceed please.

I would much appreciate any suggestions.

Regards,
Anonymous

Answer : If you are compiling under pure DOS (not DOS inside Windows) you may try adding the following lines to your C:\CONFIG.SYS:

device=c:\windows\himem.sys
device=c:\windows\emm386.exe RAM

This will give you a memory manager resident and if your compiler can see and use extended memory (above 1MB) you should be able to complete your compile.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : Thanks but I am not sure what the difference is between compiling under pure DOS & compiling in DOS inside a window.
I am in Windows95 & going to the MSDOS-PROMPT via the START button.
I have now managed to compile the file using QBASIC VERSION 2.0, after having tried VERSION 1.1 & having had exactly the same problem & error report!!! Strange???

I also tried adjusting memory settings from DOS properties but this had no effect either.

Can you please explain the difference you mention & which of the two applies to me. Thanks again.

Answer : The difference is where the memory settings reside. Windows, as you already know, handles the memory for the DOS prompt in Windows. In DOS the config.sys/autoexec.bat do.

FUQuestion : Hello again,
I would be interested to know if I could use MSDOS on my new computer in either of the above modes. Unfortunately my new computer came with Windows ME installed & I can see no obvious access to MSDOS. If MSDOS is there somewhere what version will it be?
Thanks.

Answer : Microsoft made extra strides to remove DOS vestiges from ME, so getting to a pure DOS prompt isn't as easy as in 95 or 98. You can try this procedure:

http://www.geocities.com/mfd4life_2000/

or just build a boot floppy from another 95 or 98 machine and boot from it (Start/Settings/Control Panel/Add-Remove Programs/Startup Disk tab).

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : Thanks for that but I am still not clear about how to work "in pure DOS" as you put it in Windows 95. How do you do this as opposed to working in DOS inside Windows 95 ( which I am clear about )?

Answer : On a 95 box reboot the machine and hold down the CTRL key until a menu appears during boot. Select "Command Prompt Only" and you will stop in DOS without loading Windows. That is the pure DOS mode I am referring to.
Rating : 5


----------------------------------------------------------------------
QAId : 7034151
Asker : GeneHackman
Subject : How to write to file in DOS
Private : No

Question : Hi,
I am trying to write the system's file list to one file through DOS.
Can you help me with it?
I am using Windows2000 machine.
Thanks a lot!

Answer : If by "system's file list" you mean all the files and directories on the drive you can do this like:

open a DOS prompt
c:
cd \
dir /s /a > c:\filesdirs.txt

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities




----------------------------------------------------------------------
QAId : 7042792
Asker : doubletrouble65
Subject : deleting files in DOS
Private : No

Question : I have been told my system is slow due to having lots of unwanted files in DOS How do I know which ones to delete and which to keep...

Thank you

Answer : "unwanted" is in the eye of the beholder. That aside TMP files are good to get rid of. Do this to find them all:

c:
cd \
dir /s /a */tmp > c:\tmpfiles.txt
edit tmpfiles.txt

Now you have a list of every .TMP file on your system and it's path. You can delete these for a start at cleaning up your hard disk.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7042802
Asker : anismdev
Subject : msdos setting
Private : No

Question : How can I fix an invalid msdos setting? "bootmenudelay"

Answer : Open a DOS prompt and edit the file like this:

attrib -r -h -s c:\msdos.sys
edit c:\msdos.sys

(here's an example of what it may look like):

[Options]
BootKeys=0
BootMenuDelay=0
BootMenuDefault=1
BootGUI=1

Add/change the lines to the values you want (site listed below that has all the values and their meanings) and then save the file and exit with ALT-F

http://www.security-tips.com/008.htm


Rating : 4


----------------------------------------------------------------------
QAId : 7056977
Asker : jackie3101
Subject : ScanDisk
Private : Yes

Question : I took a class in Win98 several years ago. Until then, I didn't even know what ScanDisk was. Anyway, I always agonized while using it because it takes so long. I mentioned this to a tech where I bought my PC. This was a couple years ago. He said, "Scan in DOS."

I didn't pursue it, but now I'm wondering. Is this possible?

(I could schedule these tasks, but I'd still wonder about this question.)

Thanks,
Jackie

Answer : Yes you can scandisk from DOS (not a DOS prompt in Windows). In DOS you run "scandisk"; in Windows you run "scandskw". The best way is to use the Windows Task Scheduler that runs in your systray in the lower-right of your screen to schedule a weekly run of scandisk.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : Thanks for the answer.

Is there any benefit to running one over the other?

Answer : Not really - though I'd expect the schedulable nature of the GUI version in Windows would tip the balance.
Rating : 5


----------------------------------------------------------------------
QAId : 7059012
Asker : mercegov
Subject : DOS
Private : No

Question : When I start my computer with a boot disk
how can I shut down the computer and how can I
start Windows from there.One more question
how can I open help application in DOS
Thanks!

Answer : If you start from a boot disk (floppy) there is no need to shut down as nothing is loaded but DOS (and DOS leaves nothing that needs to be cleaned up). Starting Windows after booting from floppy is not generally a good idea, although it may work. Booting from floppy makes A: your system disk and it won't have what Windows is looking for. There isn't a help app in DOS anymore - you cna get syntax help for each command by issuing the command with a /? after it. Example using dir:

dir /?

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7069960
Asker : heshamsaad
Subject : stop others from using my files
Private : Yes

Question : hi, I want to stop the others from using my files and directories .. I use this command :
(rename OLD_NAME NEW_NAME )and I add one charachter inside the new name by using (ALT_key+8) 4 times..
so no one can open my directories.
but I want to learn some another ways to do that.
thanks.

Answer : How about naming a directory like this:

c:
cd \
md ALT+0255 (on the numpad)

Now you will have an "invisible" directory to put your files in.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7076764
Asker : bruced
Subject : DIR Command using /o switch
Private : No

Question : I have a question about the DOS command - dir. I sometimes use DIR to generate a .txt file that lists all of the files in a given directory. I use the following command line:

dir /b /o > list.txt

The /b command yeilds the brief form - only the file name.

The /o is supposed to put the files in the proper order (alpabetical??).

and the > list.txt generates a text file with the output in the subject folder.

Well, my problem is that the output order is sometimes correct and sometimes way off. Most of the files that I am working with are almost the same, but with sequestial numbers such as the following:

Jim_Bob_Test_system_analysis_part_1.txt
Jim_Bob_Test_system_analysis_part_2.txt
Jim_Bob_Test_system_analysis_part_3.txt
Jim_Bob_Test_system_analysis_part_4.txt
Jim_Bob_Test_system_analysis_part_5.txt
Jim_Bob_Test_system_analysis_part_6.txt
Jim_Bob_Test_system_analysis_part_7.txt

my problem is that many times my output is out of order like the following:

Jim_Bob_Test_system_analysis_part_4.txt
Jim_Bob_Test_system_analysis_part_7.txt
Jim_Bob_Test_system_analysis_part_6.txt
Jim_Bob_Test_system_analysis_part_5.txt
Jim_Bob_Test_system_analysis_part_3.txt
Jim_Bob_Test_system_analysis_part_2.txt
Jim_Bob_Test_system_analysis_part_1.txt

What can I do to get these output in the proper order. I sometimes have dozens of files or more, so reordering them manually is a hassle and shouldn't be necessary. I have started cut-and-pasting the list to Excel where I can sort them easier, but I shouldn't need to do this either.

TIA,
BThomas

Answer : The "/o" alone should work for sorting (it defaults to folders first, files second, with both sorted by name). Since it isn't working with these extreme cases you can do this to list only files and get them in the order you want:

dir /b /a-d | sort > list.txt

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities


Rating : 5


----------------------------------------------------------------------
QAId : 7081781
Asker : adampengelly
Subject : Batch Files
Private : No

Question : Hi there. I'm cleaning out the LAN at work and am using batch files to do most of the archiving and deletion of old stuff. My problem is that when I run a DOS query, e.g:

dir O:\fadcom~1\share\fad\accounts /s /x >D:\a.txt

The directory summary is in the full name format, so that when I try and run the batch file I create, It can't find any of the files in the long name directories: e.g

O:\fadcom~1\share\fad\accounts\bank recs

as 'bank recs' is not a DOS name I think.

How can I change this, so that I can get the dir's in DOS format

Thanks

Adam

Answer : Just enclose the full name in quotes:

"O:\fadcom~1\share\fad\accounts\bank recs"
Rating : 5


----------------------------------------------------------------------
QAId : 7100817
Asker : sammy_lb_2000
Subject : Running a dos program in windows...
Private : No

Question : Hello paul,

in computer programming, if a Cobol program is
compiled and linked to produce a 32-bit Windows
Execuatable file(.exe), which is designed to run
under windows in protected mode, Can this windows
program(.exe) CALL OR RUN another 16-bit program
(.com) that is designed to run ONLY under dos?
thanks a lot for your help...!
sammy. ;-)

***


Answer : I would say almost certainly since every language I know of has the ability to execute system calls or execute external apps. It's up to Windows to provide the environment for the called program so the nature of the calling app shouldn't matter.

If you're using Micro Focus COBOL you could look into using the X"91" (function 35) system call for running external programs. You may need to run either COMMAND.COM or EXPLORER.EXE and pass the actual path/app along with it.
Rating : 5


----------------------------------------------------------------------
QAId : 7104723
Asker : kang_hsi
Subject : Uses for BATCH files?
Private : No

Question : Hello,

I just had a look at your website, and I was wondering what kinds of nifty things Batch files are used for. I'm particularly interested in operating on TEXT. For example, are there batch files that sort alphabetically the lines in a txt file? Or, that generate oft-used HTML code so that it doesn't have to be typed or pasted repeatedly?

Also, I've seen something on this board regarding running programs from within a BAT. This may sound dumb, but what is the purpose? I mean, obviously one can launch a program any number of ways, but why launch it in the middle of a batch file?

I have other questions, but I'll post them under new subject titles in case other readers want to link to them.

Much obliged,
Dave
==============================
Computer stuff: Gateway2000, Windows 98se (considering an upgrade to win xp or maybe linux).

Brain: Lots of Internet experience, some programming experience, some DOS (but the only thing I've done with batch files is delete cookies after surfing), HTML..

Answer : Most people don't just run an app from within the BAT file - they're usually launching an app from either a menu they've developed with their BAT file, in response to some detected event, or as a way to iterate through a repetitive process (like processing a large group of files one by one).

Try looking through some of the questions that have been asked of me and the other DOS experts for good examples of real-world BAT files in use.

If you get really into text processing DOS is not the best tool for that - it lacks a few tools to make it easier. I'd go with Perl or WinBatch (http://www.windowware.com) for that type of activity.

Here are some examples of BAT utilities like mine that can give you an idea of the range of tasks BAT files are useful for:

http://www.jumbo.com/utilities/dos/batchutl1/

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7119906
Asker : huge_angel
Subject : how to get dos under windows xp
Private : No

Question : hi i have install windows xp. on my computer and i want to work under dos for embedded system.
does anyone know how i can get under dos. like in windows 95 or 98.

the old fashion dos.

thanks a lot

Answer : DOS does not exist in Windows XP, except as a command prompt *within* XP. Running Start/Run/cmd.exe is as close to a true DOS prompt as XP has.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7125467
Asker : huge_angel
Subject : i need a hack to get into dos in win XP
Private : No

Question : well i know they was a crack for dos in win ME.
so can boot on dos.

well is their one for windows xp.

cause i need to work under dos for embedded control.

thanks a lot

Answer : No - Windows ME is still based on the Windows 9x (95/98) codebase and has DOS at its core. Windows NT/2000/XP are all 32-bit protected-mode operating systems and do not run DOS at their core. The only thing they have that resembles DOS is their command-line intepreter, cmd.exe.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7125902
Asker : sammy_lb_2000
Subject : Detecting windows under dos...
Private : No

Question : Hello paul,

Is there a dos command that lets you know if the
windows operating system has been loaded, or the
machine still in dos mode?
thanks a lot for your help...!
sammy. ;-)

***

Answer : One way is to look for the presence or absence of a variable that should only exist if Windows is loaded and running. The variable is WINDIR and if it exists it contains the path to the Windows directory. You can test for it similar to this (adapt the access to the environment variable's value for the language you're using):

@echo off
if "%WINDIR%" == "" goto dos
echo Windows is running...
goto exit
:dos
echo Pure DOS is running...
:exit


--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7132400
Asker : kang_hsi
Subject : Easy question: navigate to My Documents without renaming folder?
Private : No

Question : This should be easy for you all, it's a newbie question.

My DOS is getting rusty, but I know I used to simply hit start--run and type 'command' in Win98 and a DOS window would open in the very folder that I was looking at (in Windows) before starting DOS.

My PC has been through some changes, and I upgraded to 98 special edition. The DOS window still opens after I take the steps described above, but always in C/Windows/Desktop.

When I try to CD to My Documents, it says 'too many parameters' because (i think) there's a space in between the two words. I'm afraid to rename the folder, but I KNOW I used to use the cd to get there in the past. How did I do it?!

Looking for something like "MYDOC~", I did a recursive DIR from C/ and found that not only was the "My Documents" directory not listed, nothing inside it was. That's 98% of what I use?

Did I forget how it was done, or is my machine just messed up.

Many thanks,
kh

Answer : Just type:

cd "\my documents"

to enter that directory.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7138746
Asker : sabbakwa
Subject : DOS Command Box
Private : No

Question : I'd like to run a set of dos commands using a batch file without having the black DOS command box show up.

Is that possible?

Answer : Yes - you can run it once (put a "pause" command in there so it doesn't quit right away) and click on the top-left of the window. From the menu choose Properties and set the window type to "Minimized". Also be sure to check the box for "Exit when done". Now take the "pause" out of the BAT file and each time it's run it will only show as an icon on the taskbar briefly as it runs.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 4
End :


----------------------------------------------------------------------
QAId : 7158710
Asker : Anonymous
Subject : dos//partitions again:
Private : No

Question : from fdisk when I delete the the logical partition it give me that (no logical patition exist ).
then I try to delete the extended partition it me the message that (cannot delete the extended

partiotn while the logical exist).
I use a utility from seagate for low level format and also zero fill drive but the problem still

exist ??

Answer : Go download this utility and use it to delete the partition:

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

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7179844
Asker : harvey48
Subject : Slow computer
Private : No

Question : I installed Window98 on a Compaq 954 (486DX100 with 32mb ram) which had Windows 3.1 originally. Since then the computer runs very slowly especially on the web. Would installing another 32mb ram help the speed? Or isn't this slow speed a memory problem?

Answer : That's not a very fast computer, so even under the best of circumstances you may not find it quick enough under 98. To determine if more RAM is needed you can watch the HD light - if you see or hear the hard disk running a lot (like at times when you are not doing anything yourself, like downloading a program or loading something) then the system is likely swapping out to disk and a RAM upgrade would help. If not then your system is probably too slow for your needs under Windows 98.

If you want to be more precise about it try this free utility that will report on how much memory is in use:

http://download.cnet.com/downloads/0,10152,0-10106-110-7355760,00.html?gid=87426&tag=st.dl.10106-100-7355760-7355760.dln.10106-110-7355760

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7190995
Asker : dish_jp
Subject : command line ftp client for win NT
Private : No

Question : hi pauldoherty !!
I have to do ftp from the pc on which raptor firewall is there to other pc where linux os is there. But Raptor closes all the services. So I am not able to send log files of raptor firewall to my pc for developing log file analyzer of raptor firewall. That daily log file should come to my pc automaticalkly. so I am trying to use ftp but it is giving error that
" 425 can't bind data connection: connection refused"
It is coming bcoz of raptor firewall I think. bcoz I have tried this with Gauntlet firewall and without firewall to my pc on them it is working finely.

can u suggest any command line ftp client which does not use system files and can send log file to my pc from raptor firewall. ?
or
Can u suggest any other solution for fetching daily log files to my pc ? but it should come automatically to my pc. Raptor firewall is on Windows NT. My pc is having Linux os.
Plz suggest any solution as early as possible.
plz mail answer me on

dish_jp@yahoo.com

Thanks
Jagdish


Answer : NO FTP client will work in your current situation as you have said, you are blocking FTP ports 20 and 21. You will simply need to add a firewall rule near the top of your ruleset to ALLOW TCP traffic on ports 20 and 21 to/from the IP address of the machine you want to FTP the logs to. then you can use any FTP client you like (like my own FTPBatch available at my website below) - or just use the FTP.EXE that comes with Windows.


--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 7193389
Asker : Anonymous
Subject : opening a program
Private : No

Question : wat is the source code for opening a program in every start up in windows by using batch. thanx

Answer : I assume you mean to start a program from a batch file when Windows starts?

If so then make a BAT file (I'll call mine startup.bat) and save it to C:\WINDOWS

It can look like this:

@echo off
start "c:\program files\myapp\myapp.exe"


--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5

Answer : I'm sure you've figured it out by now, but I realized I forgot to mention thart after creating the BAT file, you'll want to create a shortcut to it in your Start menu under Start/Programs Startup.



----------------------------------------------------------------------
QAId : 7198794
Asker : bentonb
Subject : batch files
Private : No

Question : I am using Win 95 as an operating system. I want to develope a batch file that when executed, it would add a shortcut visible to the operator's Desktop.

Example:
Target Application for desktop shortcut is RMA Log.mde. SHORTC~1.LNK REFERS TO THE DOS SHORTCUT.

Path: \\R61SRV1\NCPM\"P I & T"\SHORTC~1.LNK C:\PROFILES\"ALL USERS"\DESKTOP\*.* /D

The problem I'm having is the file gets copied to the Desktop folder under Profiles but does not appear on the desktop itself.

Answer : Try it this way:

Path: \\R61SRV1\NCPM\"P I & T"\SHORTC~1.LNK "C:\PROFILES\ALL USERS\DESKTOP\*.*" /D

You don't want the quotes around just the "all users" portion - it goes around the whole path/filespec.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



Rating : 4


----------------------------------------------------------------------
QAId : 7203825
Asker : dr_gabster
Subject : mapping drives
Private : No

Question : we have a Dos 6.22 pc. we would like to map a drive from our NT SERVER 4.0 to this Dos pc. can you please tell me what command we should use?

please reply

gabe

Answer : First thing you need is to setup the DOS machine to get on the network. Once it's on you'll use this syntax to map a drive:

net use T: \\server\sharename

For assistance with getting the machine on the network in DOS:

http://www.bovistech.com/disks.htm

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7220215
Asker : john_dun
Subject : dos
Private : No

Question : this might sound like a stupid question. How do you re-start the computer from dos??

Thanks.

Answer : You make sure no one's looking, no app is currently open and needing to save data, and then...

you press CTRL-ALT-DEL.

:-)

(no, seriously)

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7251853
Asker : martyn80
Subject : Simple DOS question
Private : No

Question :
If I run a java program at the MS-DOS command line, e.g "java Filename argument", how can I display the output one screen at a time?
Thanks.

Answer : "java filename argument" | more

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7255582
Asker : crazy_shadow
Subject : Network Neighborhood Through DOS
Private : No

Question : hello,
does anyone know a way to access and folder in the Network Neighborhood through DOS?

Answer : Assuming you mean a DOS prompt under Windows you can type:

net use X: \\machinename\sharename

and drive letter X: will be mapped to the path you give.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7273658
Asker : cliveroberts34
Subject : dos drivers for sound card
Private : No

Question : I am trying to install 'extreme tennis'by 'head games' & I need 'dos drivers to operate dos shell thro. windows.
your help appreciated

Answer : There are no sound drivers for DOS - programs in DOS generate their own sounds and support their own select group of sound cards. To play a DOS game either in Windows (DOS box) or in pure DOS mode will require that you have a card compatible with the game and that you setup the proper environment variables to support the card. One of the most important variables is the BLASTER variable which is set with the following syntax:

SET BLASTER=A220 I5 D1 T3 P330 H6 E620

where:

A220 is the I/O address
I5 - is the IRQ (5 in this case)
D1 - is the DMA channel (1 in this case)
T3 - is the card type (try different values here 1-7)
P330 - is the MIDI port I/O address (leave this alone - no need to change it)
H6 - is the "high" DMA channel (6 in this case)
E620 - is an AWE32 soundcard parameter only and can be ignored

This variable is accessed by the game when it starts up so it knows where to look for your sound hardware.

You can get the proper values for your card in the System control panel, under the Device Manager tab. Find your sound card in the list and double-click it. In it's Resources tab you will find these values.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5
End :


----------------------------------------------------------------------
QAId : 7289010
Asker : mtecarlo
Subject : Set up a printer for use with a DOS program on a personal computer
Private : No

Question : Have old version of DOS accounting software (Dac Easy). printer is Epson Action Printer 5000 ESC/P2 (dot matrix). Software manufacturer would not support product because of it's age.

Answer : Just choose a generic printer type within the app. You may lose some of the features but you should get the output you need.


----------------------------------------------------------------------
QAId : 7289127
Asker : javalex
Subject : colors in dos
Private : No

Question : I'd like to be able to make a batch file that will show text in different colours at different parts of the screen. Long ago there were complex sets of routines for this. Also, I've forgotten how to make text appear at different parts of the screen, eg to start printing at line 12 character 40. How to you get "Hello" to appear in this position? And make it print in green.

Is there a source of all DOS commands on the net?

Yassou!

Answer : You will need to load the ansi.sys driver during boot. If you're running DOS, Windows 95/98/ME you can include it in C:\CONFIG.SYS as follows:

device=c:\windows\command\ansi.sys

Once you've booted with this you can then start using the ANSI sequences to change colors, move the cursor, etc.

For example to change your prompt at DOS to a red background with green text:

PROMPT=$e[41;32m$p$g

The sequence '$e[' is the escape sequence that gets ansi.sys involved. See the following web page for info on the other parameters you can use:

http://www.robvanderwoude.com/ansi.html

As for a reference of DOS commands, here's a good one:

http://www.easydos.com/dosindex.html

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7294304
Asker : classicgto1
Subject : autoload @ bootup
Private : No

Question : I'm reading up on DOS and I tried something and it worked! I created 5 MENU files called 1.MSD 2.MSAV 3.SCANDISK 4.DEFRAG and 5.EXIT. These AUTOLOAD at bootup, one after the other. I'm trying to set it up to have each one load one at a time so I have to push the enter button to make it go to the next one.
How do you do that?
thanks, Jim

Answer : Try putting this in between each execution line:

echo Press ENTER to continue...
pause > nul

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7308834
Asker : yendreck
Subject : invalid drive specification
Private : No

Question : I'm trying to access my cd-rom drive from MS-DOS, but my hard drive is partitioned, so that makes the cd-rom drive letter "F:". While in DOS, I can access drives A: through E:, but not F:, which is the cd-rom drive. When I try to, a message says "invalid drive specification". Is there any way I can access my cd-rom drive from DOS?

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*.* 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://home.attbi.com/~bitbucket911/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://home.attbi.com/~bitbucket911

FUQuestion : My computer used to check to see if there was something in the A:\ drive when it booted up...now it doesn't do that anymore, it just goes straight to Windows. How can I make it so that it checks the drive when it boots up?

Answer : During the beginning of a cold boot (from power up) watch for a message about "press Del to enter BIOS Setup" or something similar. Press the indicated key to enter and there will be an option in there about what order to boot from - ensure that A is first and C is second. That aside try booting from the floppy first before deciding it's not going to boot - the "floppy seek" may have been turned off but it's still set to boot from A.

Rating : 5


----------------------------------------------------------------------
QAId : 7324791
Asker : mgalke
Subject : how do I view contents of config.sys and autoexec.bat
Private : No

Question : As the subject implies, can you tell me what text editor (or even through a text editor at all) should I use to view to contents of config.sys and autoexec.bat? Thanks!!

Answer : Several ways to view or edit it:

In Windows:

Start/Run/Notepad - file/open c:\config.sys
Start/run/msconfig

In DOS:
edit c:\config.sys
type c:\config.sys
more c:\config.sys

autoexec.bat is stored at the same path, so just change config.sys anywhere above with autoexec.bat to view it instead.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7324792
Asker : mgalke
Subject : how do I view contents of config.sys and autoexec.bat
Private : No

Question : As the subject implies, can you tell me what text editor (or even through a text editor at all) should I use to view to contents of config.sys and autoexec.bat? Thanks!!

Answer : Several ways to view or edit it:

In Windows:

Start/Run/Notepad - file/open c:\config.sys
Start/run/msconfig

In DOS:
edit c:\config.sys
type c:\config.sys
more c:\config.sys

autoexec.bat is stored at the same path, so just change config.sys anywhere above with autoexec.bat to view it instead.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7328982
Asker : Anonymous
Subject : Force program to load in window?
Private : No

Question : How do I force a DOS program that runs in full-screen mode, to run in a DOS window?

I open the program from MS-DOS prompt that is in window-mode, but when it loads it changes to full-screen. How can I get around this?

Thanks in advance.

Answer : Once the app goes full-screen you can press ALT-ENTER to go back to windowed mode. At that point if you're starting the program from it's own shortcut (make one and do so, if you aren't) you click the top-left icon for that window and select Properties. Then drop down the Run option and choose "Normal window" instead of Maximized or full screen. When it asks "apply the changes to the shortcut that started this program" choose that option so the changes are saved.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7330748
Asker : mgunthe
Subject : Where can I get a bootable DOS disk?
Private : No

Question : Hi,

I need to boot straight into DOS so that I can run a low level format utility. It has been so long since
I've done this though, I don't know where I can get a bootable DOS disk? Is it possible to just modify a
MS windows install disk?

Any help would be much appreciated!

Max

Answer : If you're in Windows 95/98/ME you can quickly create one in Start/Settings/Control Panel/Add-Remove Programs/Startup disk tab. Once the disk is made copy your low-level format utility (deleting some of the larger things on the floppy you don't need to make room) and reboot. Hold the left SHIFT key during the entire boot and you will skip all boot files and have a perfectly clean DOS session.

If you don't have access to a 95/98/ME machine to make the disk you can create one as follows:
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*.* 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://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7343995
Asker : digsby14
Subject : BAT File programing
Private : No

Question : Hello,
I would like to know if anyone knows where I can get the basics of .BAT file programing. Things like how to do an if/else, create variables, and how to loop. The basics of programing.

thanks,
dan

Answer : Here's a good tutorial:

http://home7.inet.tele.dk/batfiles/intro/contents.htm

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 7360013
Asker : azern1@...
Subject : invalid partition table
Private : No

Question : Help! I am getting "invalid partition table. Setup cannot continue" message. Do I need to run fdisk? If so, are there any special parameters I need to type in or just "fdisk". Will I need to format the disk after that step? Also, I will need to install Windows 98 after that. What is the best way to proceed?

Thank you so much!!!

Need More Information : What are you doing that is causing this message? Are you starting an install of Windows 98? Details... I can't read minds so the more detail you give me the more likely I can give you good advice.

FUQuestion : I am working on one of several donated computers to be used for an after-school program. All work but this one - the above message is what appears upon boot-up. I need to get it up and running is all. I'm not sure in what order I need to do a format (there is nothing on the disk to lose), fdisk (if necessary) etc. Thank you

Answer : OK, so we're starting a clean install from scratch...

OK - Make a boot floppy 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*.* 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., B.A.
http://home.attbi.com/~bitbucket911
Home of PC DiskMaster and other Windows utilities



----------------------------------------------------------------------
QAId : 7364709
Asker : mikel1249
Subject : Xcopy
Private : No

Question : This is for Command Prompt in W2000, but it seems to be very similar to MSDOS.

I have trying to use Xcopy to move A directory and its contents to a partition on another drive.

My command is:
xcopy L:\My Documents F: E/ V/ K

I get the error message:
Invalid number of parameters

I presume the system can cope with long file names, since it is part of Windows.

What am I doing wrong?

Thanks,

Mike.


Answer : At least part of your problem stems from you using a parameter with a space in the name. DOS uses a space as a delimiter so it can tell where one parameter ends and the next begins (and also where the command itself ends and parameters begin). So where you've typed:

L:\My Documents

it should be:

"L:\My Documents"

so DOS will realize this is one parameter and not two ("L:\My" and "Documents", separated by the space).

Secondly I see issues with your use of the optional switches - some you left out the slash ("K") and others you changed the order so that the slash came after the switch ("E/"). The whole command should look like this in order to do what you want:

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /V /K

where "F:\Archive" is the directory on F: where you want the files and subdirectories you're copying to go.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7368753
Asker : reachbaig
Subject : copying large data on to multiple floppy disk one by one
Private : No

Question : HI
I would like to copy a dir structure which is large having sub directories.
I want to copy on floppy disk as i dont have a zip drive . so what is the command and switch included to copy that dir and files on to floppy .. i know the floppy will be 1.44MB size but i would like the system to prompt me for inserting another floppy disk if the first one is full.
Thanks and regards

Answer : Download the free version of WinZip - it has two features that make it desirable for this task. One is supports the spanning of mulitpl floppies you speak of, and secondly it will compress all the data so you use less disks in the end for your backup.

http://www.winzip.com

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7368765
Asker : leeegglestone
Subject : dos commands
Private : No

Question : If i wanted to boot my pc from dos ,for example if the opearating system installed wasnt working properly.

How would i do it
using the cd rom disk?? and ensuring the info on the hard drive isnt wiped??

to allow me to install the operating system again

Answer : Boot from a boot floppy instead...

To make a boot floppy (on your or another Windows machine):

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*.* 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://home.attbi.com/~bitbucket911

Rating : 4


----------------------------------------------------------------------
QAId : 7390521
Asker : gsale
Subject : Printing DOS screen
Private : No

Question : I'm trying to invert the MSDOS window so that the text is black and the background is white so that when I screen capture the dos window and paste it into Word, the printer won't use so much ink. I've tried using the PROMPT $e[7m command to invert the color scheme but it doesn't seem to work. I tried changing the config.sys file to add device=c:\windows\command\ansi.sys to the config.sys file but it doesn't seem to take affect. I'm using MSDOS Windows 98 [Version 4.10.1998]

Answer : Why not just use the clipboard to copy and paste the text and avoid the printing of the text as a bitmap?

With the test you want in the DOS window click the selection tool in the toolbar at the top of the DOS window. It looks like a dotted square if I'm remembering correctly. After clicking that drag from the top-left of the text area to the bottom-right so that all the text is inside the square you draw. Then click the copy button next to the selection tool icon to put the text into the Windows clipboard. Now simply go to Word or Notepad or any other text-handling app and paste (Edit/Paste) the text into it.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7410080
Asker : mikel1249
Subject : Further Xcopy
Private : No

Question : Paul – you gave the following answer:

pauldoherty gave this response on 2/26/2002:
At least part of your problem stems from you using a parameter with a space in the name. DOS uses a space as a delimiter so it can tell where one parameter ends and the next begins (and also where the command itself ends and parameters begin). So where you've typed:

L:\My Documents

it should be:

"L:\My Documents"

so DOS will realize this is one parameter and not two ("L:\My" and "Documents", separated by the space).

Secondly I see issues with your use of the optional switches - some you left out the slash ("K") and others you changed the order so that the slash came after the switch ("E/"). The whole command should look like this in order to do what you want:

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /V /K

where "F:\Archive" is the directory on F: where you want the files and subdirectories you're copying to go.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Xcopy worked like a charm thanks.

However, when you check properties, the new directory is four times as big and has about twenty times the number of files. The first level subdirectories seem the same and the ones I checked are the same size. In case it’s relevant, both drives are FAT32. It doesn’t matter much that this lot is incorrect, but it would be good to find out what I did wrong.

Need More Information : First off try deleting what's there (if possible without losing anything) and doing the copy again before we decide anything is different or wrong. Do the following in a DOS prompt inside Windows:

f:
cd \
deltree archive

Now do the copy again:

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /V /K

Now do the following:

cd archive
dir /s /a /-p > c:\copy.txt

and this as well:

L:
cd "\my documents"
dir /s /a /-p > c:\orig.txt

Now compare the contents of those two text files - they should be the same. In fact you may even be able to quickly compare them with the following command:

fc c:\orig.txt c:\copy.txt

Let me know what you find. If the numbers of files are the same but more SPACE is being used on one drive than another then that is no cause for alarm. Different disk partitions can use different cluster sizes. Cluster sizes dictate the smallest element on a disk - sort of like the old concept of an atom being the smallest unit of matter. If a file is smaller than the cluster size it must still take up at minimum one cluster so some space is wasted. For a given file the larger the cluster the more space will be wasted. This obviously only applies to files that are smaller than the cluster size of the partition in question (cluster sizes usually are between 4 and 64K (Kilobytes)). For larger files what happens is that many clusters are used, and all are filled to capacity except perhaps the last one if the last amount of data to be stored is not exactly enough to fill the cluster. So large files waste less space on your disk since they will fill many clusters completely, leaving at most one partially full. Contrast this with small files, which must take up at least one cluster, but many times do not come near filling up even that one cluster (for example a 100 byte AUTOEXEC.BAT file in an 8K cluster - roughly 7,900 bytes are wasted), and you can see that small files, while taking up little in actual data space (the total shown at the bottom of the DIR output) can take up large amounts of your actual disk space by allocating less-than-full clusters.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : I wiped out Archive and did it again - still the same problem: too many files.
This time I checked the first level sub-directories - Of about 20 - 30 most were ok. Six were nearly right: 1 - 3 files over or under. One, however, was way out - about 800 extra files and 70 extra directories.

Answer : After you do:

f:
cd \
deltree archive

ensure that the F:\Archive directory is actually gone before running the copy again. And before doing the copy do this:

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /V /K

L:
cd "\my documents"
dir /s /a > c:\L.txt

Also do the same on F:\Archive after the copy:

F:
cd \archive
dir /s /a > c:\F.txt

You'll notice at the bottom of both text files a summary like this:

Total Files Listed:
6326 File(s) 654,113,906 bytes

You can see the total number of files in the source directory and the destination and ensure they are the same.

And do the copy this way:

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /H /V /K

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities






FUQuestion : After doing

f:
cd \
deltree archive

there were a few directories left – not deleted.

Then:

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /V /K

copied only about 20% of directories


And then,

xcopy "L:\My Documents\*.*" F:\Archive\*.* /E /H /V /K

Also copied only a few directories – it seemed to trip on a long directory name:


Health\Marijuana\New Scientist\New Scientist Planet Science Marijuana Special R
eport addiction, safety, effects on your brain -- find the answers about cannabi
s here Let's be adult about this___files\references.gif
Health\Marijuana\New Scientist\New Scientist Planet Science Marijuana Special R
eport addiction, safety, effects on your brain -- find the answers about cannabi
s here Let's be adult about this___files\title.gif
Health\Marijuana\New Scientist\New Scientist Planet Science Marijuana Special R
eport addiction, safety, effects on your brain -- find the answers about cannabi
s here Let's be adult about this___files\navbarsearch.gif
Health\Marijuana\New Scientist\New Scientist Planet Science Marijuana Special R
eport addiction, safety, effects on your brain -- find the answers about cannabi
s here Let's be adult about this___files\site=NS&nssection=POT&size=120x60.html

Health\Marijuana\New Scientist\New Scientist Planet Science Marijuana Special R
eport addiction, safety, effects on your brain -- find the answers about cannabi
s here Let's be adult about this___files\site=NS&nssection=POT&size=468_60.html

Unable to create directory F:\Archive\Health\Marijuana\New Scientist\New Scienti
st Planet Science Marijuana Special Report addiction, safety, effects on your b
rain -- find the answers about cannabis here Let's be adult about this___files\
site=NS&nssection=POT&size=120x60_files
2572 File(s) copied

Yet, this was all copied successfully previously.

I have been doing this in the MSDOS that comes with Win 98. Previously, I might have been using the command prompt in W2000.

Is it possible there is corruption in the system?
I’ll be buying Norton Ghost later. It’s not possible that it does this sort of stuff?

Answer : Ghost doesn't do that - it images whole partitions or disks.

One thing you may want to try is go and get the command-line add-on for WinZip and use it from within your BAT file to zip up and then unzip the directory tree in question. It may be able to handle those long directory names for you. The download is here:

http://www.winzip.com/wzcline.htm

It has documentation with it showing the syntax you'll use to zip and then extract the directory structures. Just perform a zip from "L:\My Documents\*.*" to F:\mydocs.zip or somesuch. Then on the next line of the BAT file extract it to F:\archive which will recreate the structure.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7441117
Asker : harleydaividson
Subject : DOS Batch File
Private : No

Question : Dear experts,
I'm planning to install multiple versions of windows. Is there a batch file that when booting gives you a menu of the operating systems installed on your PC and lets you choose which one will you use. If there is, where can I find it and how will I use it?
Any help would be greatly appreciated.
Thank you very much.

Answer : There is no BAT file to do this. What you need to do is properly plan your install. One of the things to be aware of is that, without the use of third party software like System Commander, you cannot install two versions of the same family of Windows (for example Windows 95 and Windows 98). You can install two versions of Windows from different families, however, with no additional software (for example Windows 98 and Windows 2000). To do this simply install Windows 98 first, followed by Windows 2000. Be sure before beginning that you have set aside a partition or free space for both OS's. Then install 98 to the first partition and 2000 to the second.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7501735
Asker : pbolan
Subject : dos
Private : No

Question : I used to have a bat file program for rewriting diskettes.Which basically read the diskette and stored the info away,then formatted the diskette and rewrote the info on the diskette.This was done to overcome any magnetic deterioration during the years'

I can't remember how to answer questions like yes or no or enter on a bat file .Assuming I made myself clear do you know the hidden commands for that.

Thank you
Paul

Answer : If you mean how can you answer y or n to a query inside a BAT file you can do it like this:

echo y | program
echo n | program

where 'program' is the command you're running that will be asking for a y or n answer.

As for generating a carriage return, I've done it this way in the past:

copy con c:\wherever\return
^M
^Z

In the above sequence "^M" and "^Z" mean press CTRL-M, and CTRL-Z, respectively.

Now you have a file that contains a CR and can use it at the command line:

program < c:\wherever\return

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7501808
Asker : kvaruni
Subject : Passing results of a dos command to another command
Private : No

Question : I want to use the find command to extract a part of another command, but I want the result of this find command to be used as a parameter for another command.

So what I want is something like this
command1 | find "string" -> and the result of this command needs to be passed to a second one:
command2 result

Can anyone help?

Answer : What you want is not achievable with straight DOS. You may try using my utility Recurse to assist you, however. You can store the results from the first part to a file:

command1 | find "string" > c:\temp.txt

And with the second line of the BAT file call recurse to deal with the resultant item(s) in the temp.txt file:

recurse c:\2ndcmd.bat c:\temp.txt

and 2ndcmd.bat would contain simply this:

@echo off
command2 %1

If you expect multiple entries from your initial "command1 | find" commands use the concatenation operator to add all of them to temp.txt:

command1 | find "string" > c:\temp.txt
(some other functions, or perhaps your command1 gets run multiple times within a 'for' loop)
command1 | find "string" >> c:\temp.txt
command1 | find "string" >> c:\temp.txt
command1 | find "string" >> c:\temp.txt

Note the first one is the standard output redirection - doing this will ensure that only fresh data is in the file as this first usage will empty the file before putting the result in it.

Recurse and other tools of my design are on my webpage below.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities




----------------------------------------------------------------------
QAId : 7545589
Asker : davecoll
Subject : DOS Mode
Private : No

Question : I have just set up a new computer system with Windows 98 SE.Everything in Windows seems to work fine, but in DOS mode I have no CD_ROM drive or ATAPI ZIP Drive. If I go to the DOS prompt under Windows its ok, but if I boot up in DOS, or restart in DOS mode I have no CD or ZIP drive.My autoexec.bat and config.sys file in C: are blank.
What did I do wrong?
How do I fix it?

Answer : That is normal. DOS by itself does not support optical or ZIP drives without you loading specific drivers to get them to work. For the ZIP drive you will need to visot iomega.com and download their DOS drivers. For the CD-ROM grab this file:

http://ped.deadartists.com/idecd.sys

Copy it to your C:\WINDOWS directory and then edit the config.sys and autoexec.bat as below:

config.sys:

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


autoexec.bat

\windows\mscdex.exe /d:cd1 /l:f

Now when you boot to DOS (pure DOS that is, by pushing F8 right as the machine starts to boot (or holding the CTRL key) and choosing "Command Prompt Only") you will have your CD-ROM drive on letter F:

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 4


----------------------------------------------------------------------
QAId : 7571674
Asker : Anonymous
Subject : Pause in Batch Files
Private : No

Question : Windows 2000/XP Batch File

I am creating a batch file. I'd like to put a pause (for a ? amount of seconds) between different operations, but not by using the command "pause" which says "press any key to continue"

In Unix, this is possible by using the "sleep" command. If you put "sleep 2" in a Unix batch file, it will pause for 2 seconds.

Is there a command in Windows that allows this feature?

Answer : Download sleep for DOS here:

http://ped.deadartists.com/sleep.exe

Rating : 5
End :


----------------------------------------------------------------------
QAId : 7627802
Asker : Anonymous
Subject : Where should the Himem.sys file be?
Private : Yes

Question : Could you tell me where the Himem.sys file should be so that your computer can work in the Dos mode. I happen to find there is a Himem.sys in my C:\Windows and another (the same size) in the root drive C:\. And below is the content of my Config.sys file.

When Win98 starts, it says there is an error in my Config.sys file (Line 8: DEVICE=C:\windows\command\HIMEM.SYS )

Please help me correct this. I cannot use Scandisk in the Dos mode either.

My gratitude,




[menu]
menuitem=win
menuitem=SETUP_CD, Start Windows 98 Setup from CD-ROM.
menuitem=CD, Start computer with CD-ROM support.
menuitem=NOCD, Start computer without CD-ROM support.
menudefault=SETUP_CD,30
menucolor=7,0
DEVICE=C:\windows\command\HIMEM.SYS

[SETUP_CD]
device=c:\windows\himem.sys
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001

[CD]
device=c:\windows\himem.sys
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001
[win]
[NOCD]
device=himem.sys /testmem:off

[COMMON]
device=c:\windows\himem.sys
files=60
buffers=20
dos=high,umb
stacks=9,256
rem - By Windows Setup - lastdrive=z


Answer : Just take line 8 out of your CONFIG.SYS file. First off it references himem.sys from a path where it doesn't exist, and secondly, it's redundant since you are already loading himem.sys (correctly) from each of the menu sections beneath it. No mention of any drivers including himem.sys should be in the "menu" section.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities
Rating : 5


----------------------------------------------------------------------
QAId : 7635429
Asker : Anonymous
Subject : Where should the Himem.sys file be?
Private : No

Question : Could you tell me where the Himem.sys file should be so that your computer can work in the Dos mode. I happen to find there is a Himem.sys in my C:\Windows and another (the same size) in the root drive C:\. And below is the content of my Config.sys file.

When Win98 starts, it says there is an error in my Config.sys file (Line 8: DEVICE=C:\windows\command\HIMEM.SYS )

Please help me correct this.

My gratitude,




[menu]
menuitem=win
menuitem=SETUP_CD, Start Windows 98 Setup from CD-ROM.
menuitem=CD, Start computer with CD-ROM support.
menuitem=NOCD, Start computer without CD-ROM support.
menudefault=SETUP_CD,30
menucolor=7,0
DEVICE=C:\windows\command\HIMEM.SYS

[SETUP_CD]
device=c:\windows\himem.sys
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001

[CD]
device=c:\windows\himem.sys
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001
[win]
[NOCD]
device=himem.sys /testmem:off

[COMMON]
device=c:\windows\himem.sys
files=60
buffers=20
dos=high,umb
stacks=9,256
rem - By Windows Setup - lastdrive=z


Answer : Remove line #8

DEVICE=C:\windows\command\HIMEM.SYS

You are already correctly loading himem.sys from the Windows directory in each section. The "menu" section should never have any drivers listed.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7643125
Asker : Anonymous
Subject : Why the CD-Rom doesnt' work in Dos mode?
Private : No

Question : I have made a startup disk, but it is strange that when I use it to boot the computer, it cannot detect there is a CD-Rom drive.

Later, I try to boot from my hard drive and found that, if I enter the Command Prompt mode (Dos mode), I also cannot detect the CD-Rom drive, although the Cd-Rom drive works well in Windows mode.

Can you help explain this situation?

Answer : CD-ROMs require a driver to accessed. Windows has those drivers. DOS doesn't.

Download this file:

http://ped.deadartists.com/idecd.sys

Save it to the floppy or to C:\

Also copy the following files to your floppy:

mscdex.exe
himem.sys
smartdrv.exe

Then edit the following files on your floppy or the root of C: and add the lines shown:

CONFIG.SYS:

device=\himem.sys
device=\idecd.sys /d:cd1

AUTOEXEC.BAT

\mscdex.exe /d:cd1 /l:f
\smartdrv.exe /n c+ f 8192 8192

Rating : 5


----------------------------------------------------------------------
QAId : 7651449
Asker : asaini64
Subject : Batch file
Private : No

Question : Hi there,

I am in process of creating of a batch file. I want to delete a file created on a previous day eg I echo %date%, %time% >> %date%.txt.
when this file runs next day I want the file created on previous day get deleated how should i go about it.

Thanks

Adarsh

Answer : Processing filenames based on their dates is not a trivial task in DOS. I suggest you look info my utility DateSet as you may be able to use it for this task with a little ingenuity.

http://home.attbi.com/~bitbucket911

FUQuestion : Hi Paul Thanks for your help but when I run it on a windows 2000 system i am getting an error.

3052:uninitialized variable or undefined function
ampm=param4
Winbatch 32 2000c
WIL version:3.0cbv

Thanks

Adarsh
Rating : 4

Need More Information : If you woould, give me some details on what you did installing it and what BAT file you used to invoke it.

FUQuestion : Paul,

I unzipped dataset to a directory c:\adarsh\dateset
I first tried to run the dateset from the folder itself then tried from the command prompt both times I got the same message. It did not create the batch file in the name of mydate.bat. But i manually created mydate.bat with the contents you mentioned in the text file that works fine only problem is I cannot create a batch file daily.

Thanks


Answer : DateSet runs fine for me under Windows XP. Try getting the DateSet archive from my other web site - http://ped/deadartists.com

Then create a BAT file to invoke it and test:

@echo off
c:\adarsh\dateset\dateset.exe
call c:\mydate.bat
echo %YEAR%
echo %SECS%
echo %AMPM%
echo %HOURS%

Let me know what you get from that.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7664432
Asker : Anonymous
Subject : DOS delete file depends upon date
Private : No

Question : I have to delete some file in DOS environment depends upon date of last modification. how to do that?

Answer : Use my utility ProcessByDate I wrote to overcome this DOS limitation.

http://ped.deadartists.com/ProcessByDate.zip

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7668934
Asker : creanius
Subject : boot from DOS and then go to Windows
Private : No

Question : I am unable to boot my computer from the hard disk (with win98 Second edition) and when i use a floppy to boot it, it opens in DOS. How can i then go to windows mode from DOS? and what can i do to make my computer boot from the hard disk?

Answer : Some detail about what happens when you try to boot from DOS would be very helpful if you want a diagnosis. You need to be booting from the hard drive to run Windows. One thing you may try (shot in the dark until you reply with details of what your hard drive is doing) is booting from the floppy and then issuing the command from A:\ (type it exactly as you see it):

c:\windows\sys.com c:
c:\windows\fdisk.exe /mbr

Now take the floppy out and try to reboot.

NOTE - Only try this procedure if the DOS floppy you're using was made from the same machine (that is, the same or if older a very recent version of Windows/DOS).

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : I do not have a boot disk and can make one from another machine. now what do i do?

Need More Information : You *can* or *cannot* make one from another machine? You're going to have to warm up those fingers and type some detail if I'm going to help you. What does the hard drive do when you try to boot from it?

FUQuestion : whenever i start the computer it asks to insert a boot disk and then press enter. I CAN make a boot disk from another machine but it has Windows Me. The computer does not boot from hard disk and asks for a boot disk (floppy) and does not boot from even a CD.

Need More Information : Is the hard drive even accessible after booting from a floppy? Try this:

dir c:\

after booting from floppy. Do you see the files and dirs on C: or just an error message?

Second check your BIOS (press DEL usually during a cold boot - during RAM test) and be sure that:

a) The hard drive is detected on the primary channel as Master.

b) That the parameters for the drive are correct (or set to "Auto").

c) That in your boot order the hard drive appears after the floppy and CD-ROM drives. As a testing step you may want to make the hard disk the first device just to be sure nothing else gets tried first.

If all of those are OK and you saw files in the first test above I would get a DOS boot disk from a Windows 98 machine (or from http://www.bootdisk.com) and perform the steps I mentioned in the first message (sys and fdisk /mbr).

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7681240
Asker : kellie_fitton
Subject : Looking for deltree.exe and move.exe files...
Private : No

Question : Hello,

in windows XP home edition we can not find the
files "deltree.exe" and "move.exe" which we used
to have in windows 98se. Is there other files in
windows XP that do the same functions?
thank you, kellie.

Answer : Windows XP has the "move" command (may have moved to an internal command as I see no EXE/COM for it). Deltree was not included in XP for whatever reason MS may have. You are stuck with "rd" (remove directory) which has the unpleasant limitation (and original reason for the creation of deltree) that is will not remove any directory that isn't empty. Which means you have to recurse your way through it deleting all the files and removing all the dirs before you could use it to remove the one branch you really wanted to be rid of. So the GUI is the best choice for removing dirs in XP.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7711213
Asker : jsimontex
Subject : MSDOS
Private : No

Question : How do I reboot my computer to msdos?

Answer : Depending on the Windows OS you're using (which may dictate whether you even HAVE DOS or not) you can get to it by holding the left CTRL key down during a reboot until a menu appears. Choose "Command Prompt Only" if that option is available and you'll be in pure DOS.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7713544
Asker : abofahad9
Subject : I need a command
Private : No

Question : I need a command that let me go directly to specific key in windows registry

for example I would like a command to go to HKEY_USERS\.DEFAULT\Software

Or to delete a key without opening registry.

Hope I find answer

thanks

Answer : Taken from Usenet:

REG operation <Parameter List>

operation [ QUERY | ADD | UPDATE | DELETE | COPY |
SAVE | BACKUP | RESTORE | LOAD | UNLOAD ]

For help on a specific operation type:
REG operation /?

Examples:



REG QUERY /?
REG ADD /?
REG UPDATE /?
REG DELETE /?
REG COPY /?
REG SAVE /?
REG BACKUP /?
REG RESTORE /?
REG LOAD /?
REG UNLOAD /?



REG QUERY RegistyPath [\\Machine] [/S]

RegistryPath [ROOTKEY\]Key[\ValueName]
ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
Optional. When omitted HKLM is assumed.
Key The full name of a registry key under the selected
ROOTKEY.
ValueName The value, under the selected Key, to query.
Optional. When omitted all keys and values under the
Key
are listed.
Machine Name of remote machine - omitting defaults to current
machine.
Only HKLM and HKU are available on remote machines.
/S, /s Queries all subkeys.

Examples:

REG QUERY HKLM\Software\Microsoft\ResKit\Setup\InstallDir
Displays the value of the InstallDir registry entry.

REG QUERY HKLM\Software\Microsoft\ResKit\Setup /S
Displays all keys and values under the Setup sub-key.
Rating : 5


----------------------------------------------------------------------
QAId : 7748639
Asker : saliz
Subject : restore
Private : No

Question : i have no restore CD
i was told i was able to restore the system using a startup disk
i have reformated the PC
and i need to comands in msdos to reinstall the original operating system on the pc.
(windows 95)

Answer : OK - Make a boot floppy 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*.* 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 Win95 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:\win95\*.* c:\win95kit\*.* /e

Now boot off the hard disk and do:

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


--
Paul Doherty
http://home.attbi.com/~bitbucket911
Home of PC DiskMaster and other Windows utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7755337
Asker : saliz
Subject : restore
Private : No

Question : i have no restore CD
i was told i was able to restore the system using a startup disk
i have reformated the PC
and i need to comands in msdos to reinstall the original operating system on the pc.
(windows 98)

Answer : You don't have a restore CD.

I'll assume you have the Windows 98 CD - if not then you're stuck.

OK - Make a boot floppy 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*.* 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, CCSA, CCSE, A.A.Sc., B.A.
http://home.attbi.com/~bitbucket911
Home of PC DiskMaster and other Windows utilities

Rating : 5


----------------------------------------------------------------------
QAId : 7762696
Asker : mrwires
Subject : computer starts in dos
Private : No

Question : My wife has an IBM think pad, and when we start it, it starts up in dos mode, and I have NO idea how to get it to start in windows??? It does or did have windows 98. Can you help direct us "PLEASE" thank youin advance > Jim

Answer : Try pressing and holding the left CTRL key (right may as well) during a reboot until a menu appears. Choose "Normal" as the boot choice and see if you get into Windows that way. If you do then there is probably something set wrong in your C:\MSDOS.SYS file. If not then try the CTRL trick again except this time choose the LOGGED boot, then reply to this message with the contents of the file C:\BOOTLOG.TXT after it fails.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7763485
Asker : Anonymous
Subject : Dos
Private : No

Question : Hi Guys,
What the best way to learn DOS? Do you think one can learn it by himself, through books and free online information, and end up being really good.
Thank you.

Answer : Sure you can learn DOS on your own. I'd suggest you pick up a good DOS reference book (and a few sites like easydos.com) and then start experimenting. A good way to learn is to try to write BAT files to automate tasks - these will teach you to think in terms of the abilities/limitations of DOS.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5

FUQuestion : Thank you.
As a follow up, will you please suggest a good reference book for DOS; I really appreciate that you recommended a website.
Thanks

Answer : I don't have a really good DOS book I'd suggest for a beginner, but these look quite good:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2024753224

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2025724594

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=1538393431


----------------------------------------------------------------------
QAId : 7789645
Asker : vin_san200178
Subject : MS-DOS Doubts
Private : No

Question : Hi,

I have some doubts about the DOS memeory management. I have MS-DOS 5.0.

I have Windows 98 II edition. I run an entertainment hub where I have all sorts of games for kids, including Quake (OpenGL) to WOLF3D (DOS).

The games such as Alladin (DOS), Wolf3D (DOS) and BioMenace (DOS) run in DOS environment. Now on 2 of my PCs, a few days ago, I had reinstalled Windows 98. Since then these games have started giving errors.

WOLF 3d works perfectly fine. Bio-menace hangs on Firing the gun whereas

Alladin gives an error such as

"EMS allocation Error..." on executing the game EXE.

Now this paricular error I get when I run the game through windows. When I run the game Alladin thru DOS I get a similar error

"XMS allocation Error..."

I have tried reinstalling the games again but all in vain.

My CONFIG.SYS is as follows...

FILES=120
BUFFERS=80
LASTDRIVE=Z
DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE NOEMS
DOS=HIGH, UMB
DEVICE=C:\SAN\SBIDE.SYS /D:MSCD001 /P:170,15 /V

Now in DOS mode whenever I run the "mem" command I get

C:\>mem

Memory Type Total Used Free
---------------- -------- -------- --------
Conventional 640K 76K 564K
Upper 155K 155K 0K
Reserved 384K 384K 0K
Extended (XMS) 64,357K 129K 64,228K
---------------- -------- -------- --------
Total memory 65,536K 744K 64,792K

Total under 1 MB 795K 230K 564K

Largest executable program size 564K (577,808 bytes)
Largest free upper memory block 0K (0 bytes)
MS-DOS is resident in the high memory area.

Now If I make changes in CONFIG.SYS by writing only...

DEVICE=C:\WINDOWS\EMM386.EXE instead of

DEVICE=C:\WINDOWS\EMM386.EXE NOEMS

,all the 3 games stop working. That is also the case when I type REM before

DOS=HIGH, UMB

Hence plz help me by suggesting some remedy for this.

Thanx.

Answer : Try using your EMM386 line like this:

device=c:\windows\emm386.exe ram frame=none

also try changing:

DEVICE=C:\SAN\SBIDE.SYS /D:MSCD001 /P:170,15 /V

to:

DEVICEHIGH=C:\SAN\SBIDE.SYS /D:MSCD001 /P:170,15 /V
Rating : 4


----------------------------------------------------------------------
QAId : 7883981
Asker : ken_brose
Subject : Write Protected Hard Drive in DOS 6.22
Private : No

Question : Hi,

I am trying to attempt the following:

1. I am running FDISK from the Windows 95 Startup Diskette.
2. In FDISK, There is a primary DOS partition.
3. I delete the DOS Partition with no trouble.
4. I then try to "Create" a new Primary DOS partition, I get the following error -->
"Verifying Drive Integrity ---> Completed 19%
Write Protect error writing fixed disk"
5. I am then instructed to ESC and reboot.

6. Once I reboot, I then try to do a FORMAT C: from the "A:" drive.
7. It comes back with the following:
Invalid media or Track 0 bad - disk unusable.
Format Terminated.

-------------------------------------------------

My question is: How do I "Un-Write Protect my Hard Disk, so I can "re-partition" & "re-format" it???

Thanks in advance for all the help....

Sincerely,

Ken J. Brose

P.S. I even tried this procedure using MS-DOS 7.1 and got the same results...

Answer : Try executing a:

lock c: /off

before running fdisk.


----------------------------------------------------------------------
QAId : 7910077
Asker : Henrywilfred
Subject : How do I create variable names in a dos batch file ?
Private : No

Question : I have a batch procedure that copies all files changed since a certain date into a zip file named george.zip :

c:\incrbkup\pkzipc -add -dir=root -aft=05-05-2002 c:\incrbkup\GEORGE.zip c:\*.*


Each time I execute this procedure, I want to change the zip file name as follows:
1st use ------ filename is GEORGE1.zip
2nd use ------ filename is GEORGE2.zip
3rd use ------ filename is GEORGE3.zip
... now recycle through those same names
4th use ------ filename is GEORGE1.zip
5th use ------ filename is GEORGE2.zip
... etc..

How can I do this ?


Answer : You can use my free utility Count to do this - it allows you to perform arithmetic in DOS batch files. There is a count.txt file in the ZIP that fully explains how to use it.

http://ped.deadartists.com

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : Paul,

This looks like exactly what I need. Thank you.

I have one question. Can I check when COUNT = 4 and then reset it to 1 so that I get only the number 1, 2 and 3 to append to my backup file name ? (your example is exactly what I want to do).

I don't now how to do the check ??

Thanks again.

Answer : Here's an example I just wrote to test:

@echo off
d:\winnt\system32\count.exe
call c:\count.bat
if '%COUNT%' == '5' goto equals5
goto end
:equals5
echo COUNT is 5
:end

Running test.bat successively results in the output (on the run when COUNT equals 5):

COUNT is 5

Answer : For your purposes you would perhaps be doing something like this:

@echo off
d:\winnt\system32\count.exe
call c:\count.bat
if '%COUNT%' == '4' goto equals4
goto end
:equals4

REM next line resets COUNT by deleting c:\count.bat
del c:\count.bat >nul

REM We then can re-run count.exe to start the count again
d:\winnt\system32\count.exe
call c:\count.bat

REM Now count is back to 1 and can be used
:end

Rating : 5


----------------------------------------------------------------------
QAId : 7910082
Asker : siamboxer
Subject : DOS on winXP
Private : No

Question : Hi.
I have a problem with a viral folder in my Windows XP.

The problem is, even with antivirus', I can't delete it from Windows because I guess it is somehow being used from startup.

Therefore, I must delete this folder before windows has a chance to startup.

How can I delete folders from DOS?
What are the prompt commands?

Thanks.

Oh yeah, one other thing.
I noticed that in WinXP, from DOS, I can't run:
"c:\ format c:" anymore to format my hard drive. I used to be able to run this in Win98, but not in XP.

Is there another way to format my hard drive from DOS or from WindowsXP (which I tried but couldn't find a way)

Thanks!!

Answer : Just create a boot floppy from another machine (or download one from bootdisk.com), ensure you put deltree.exe on it, and after booting from the floppy use:

c:
cd \wherever
deltree virus_dir

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 7935502
Asker : Romeo26222
Subject : NTFS and DOS
Private : No

Question : Hello everybbody
I want to know if there is any way to access a NTFS partition from DOS or not
thanx

Answer : NTFSDos allows that:

http://www.sysinternals.com/ntw2k/freeware/NTFSDOS.shtml


----------------------------------------------------------------------
QAId : 7952603
Asker : Cinque
Subject : Computer
Private : No

Question : Periodically I get a prompt saying "computer is unable to do this or that because a program or device driver is running".How can I check to see what programs may be running in the "background" and how do I turn it/them off??? I use the icons on the taskbar but evidently I'm not turning all programs off that are notin use.

Answer : Press CTRL-ALT-DEL once and examine the list of items running in the task list. The only ones you have to keep running are explorer and systray. The rest can be killed from there and then you can run your install or app or whatever.
Rating : 5


----------------------------------------------------------------------
QAId : 7969050
Asker : kenneyt61a8g0
Subject : I need a floppy disk with all the dos commans to format my hard drive as an operating system
Private : No

Question : where can i get the dos applications on floppy disk to format my hard drive as an operating sysstem (format c: /s). Windows does not support this anymore/

Answer : http://www.bootdisk.com has bootable DOS floppies for download with utilities such as format (supporting the /s parameter).


----------------------------------------------------------------------
QAId : 8010338
Asker : el0113
Subject : how to copy all data in c: to d:(via Dos)
Private : No

Question : as topic

Answer : xcopy c:\*.* d:\*.* /e /c

"/c" is optional and may not apply depending on the version of DOS in use.
Rating : 5


----------------------------------------------------------------------
QAId : 8010344
Asker : doug_thiel
Subject : com port 2
Private : No

Question : i reinstalled win 98 se.. since then my computer wont connect to the net...i check all settings a million times over and all is well.. i called my isp and they are stumped... then i found a dos command called "debug" which when it is entered a hyphen shows then i type in "d 40:0" and it shows all my com ports addresses. i read the in structions and it explains that the numbers rerpresent address which are assigned to which port... well my computer has no port assigned to the com ports 2-3 or 4....according to these numbers... i dont have the numbers for com 1 but for com 2-3-and 4 all are zeros.which tells me my computer has no com port 2 address... how do i get to assign a com port 2 address??? i dont need com 3 or 4 so i am just wondering how to assign a set of numbers for com 2....any ideas?????

Answer : COM ports are enabled and disabled in your BIOS. Enter the BIOS setup by pressing the indicated key during a boot (usually DEL).
Rating : 4


----------------------------------------------------------------------
QAId : 8014473
Asker : Locii
Subject : Appending text files
Private : Yes

Question : Hello...
I've got several text files. I also have an existing "master" text file that I want to keep, but into which I need to copy (append) all the other text files. I know about 'copy one.txt + two.txt + three.txt master.txt' but this overwrites the existing master.txt file, losing everything that was in it before. Any help would be appreciated, especially a batch file that performs as needed.

Answer : You can do it this way:

type newfile.txt >> master.txt

which will append the info in newfile.txt at the end of the master.txt file without losing any of the master.txt file contents.

Or with:

copy /a master.txt + /a file1.txt > newfile.txt
(OPTIONAL) copy newfile.txt master.txt

You can use that syntax with several files too:

copy /a master.txt + /a file1.txt + /a file2.txt > newfile.txt

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities


Rating : 5


----------------------------------------------------------------------
QAId : 8038988
Asker : friendship_79
Subject : BATCH FILE
Private : No

Question : HELLO SIR I WAS WONDERING IF U COULD HELP ME WITH THIS BATCH FILES THING I WOULD VERY APPRECIATE THAT
WHTA I KNOW ABOUT THEM IS THEY ARE LIKE A GROUP OF COMMANDS WRITTEN TOGETHER AND EXECUTED AT ONE TIME IN OTHER WORDS INSTEAD OF WRITING THEM INDIVIDUALLY BY MAKING THEM A BATCH FILE CAN BE EXECUTED AT ON SHOT!!!
OK NOW WHEN TO USE THEM AND HOW CAN THIS BE USED WHAT ARE PPL USING THEM FOR ???? I HAVE THIS WHOLE BATCH THING CONFUSED I WOULD BE VERY VERY THANKFUL IF U COULD HELP ME OUT!!!!
THANX IN ADVANCE

Answer : Batch files are great for taking care of repetitive chores or for doing changes to lots of things quickly. I use BAT files for lots of things. Just yesterday I helped a friend write one that would stop and restart a leaky service on his NT Server.

Yes they are a series of commands that are executed in order, but there are also a few control structures available in a BAT file that are not accessible at the command prompt. One is a "goto", another is the "if" statement.

If you need more information ask a followup question to this one with a more detailed question about what you may have in mind.
Rating : 4

FUQuestion : SIR I AM GLAD U FIND A TIME TO ANSWER MY QUESTION
BUT SIR I NEEDED TO KNOW HOW TO WRITE THEM AND BEING A USER WHAT CAN I DO TO PLAY WITH THEM I MEANT WHT CAN I ACCOMPLISH WRITING THEM
FOR INSTANCE IF I WANT MY COMPUTER TO AUTOMATIALLY START A TASK AT THE CERTAIN TIME THINGS LIKE THAT
I KNOW THERE IS AN OPTION IN WINDOWS WHICH WOULD ALLOW ME TO AUTOMATE TASKS VIZ TASK SCHEDULER I GUESS
BUT I WANNA DO IT USING "BATCH FILES"
PLEASE HELP ME !!!!

Answer : The task scheduler can itself be used to *invoke* BAT files which can perform repetitive tasks in an automated fashion. If you want to simply run a BAT file that will time its operations you will need a utility such as sleep.exe, easily found on the net. Sleep will allow you to pause execution for any number of seconds.

As for general-purpose instructions on BAT file writing that is beyond the scope of one question and answer session here. If you have a specific question about a task you'd like to try to automate with a BAT file please ask it in detail now.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

End :


----------------------------------------------------------------------
QAId : 8056830
Asker : zort15
Subject : A few BAT file questions
Private : No

Question : I don't know that much about BAT files, I'm running win XP, i was wondering how i would get a BAT file to run when a particular person loged on, I guess it would be the same as when your computer starts up.
I was also wondering how you would do the equivlant of pressing a key. Like if you wanted the BAT file to press the ENTER key, or the A key.

Answer : You can get it to start for the person when they login by putting the BAT file into their

C:\Documents and Settings\<USERNAME>\Start Menu\Programs\Startup

directory. As for mimicking keystrokes you can't really do that with BAT files. If you want to be able to send keys to an application my utility PopKey can do that, but my current version does it on command, not from BAT files. Check my webpage below and you can see if it's useful to you.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8065917
Asker : dolby88
Subject : MAKING HDD BOOTABLE?
Private : No

Question : HELLO

THIS IS WHAT I GOT. I AM INSTALLING MSDOS6.22 AS MY O.S. BUT I WANT TO USE WINDOWS ME BOOT DISK FILES, SO I USE ATTRIB TO UNHIDE IO.SYS AND MSDOS.SYS AND ALSO I MAKE THE COMMAND.COM TO BE OVERWRITE.SO NOW IF I REPLACE ONE OF THOSE THREE FILES FROM DOS6.22 TO WINME BOOT DISK.IS WHEN THE PROBLEM
START NOW THE COMPUTER BOOT UP BUT IT SHOW THE ALL SCREEN FULL OF N<F.N<F.

AND THATS IT NOTHING ELSE.

THIS IS MY QUESTION:

HOW DO I MAKE A BOOTABLE HDD USING WINDOWS ME BOOT DISK FILES ONLY?

NO... MSDOS6.22


Answer : You need to "sys" the drive to make it bootable. But you probably won't be successful using ME tools since ME was MS's attempt to distance itself from DOS. Go to bootdisk.com and grab a disk image from DOS 5.0 or later and use the sys.com utility (or format /s - WARNING - THIS IS AN OPTION DURING FORMAT WHICH WILL DELETE YOUR DATA) to make your hard disk bootable. If the boot disk has sys.com that is the next option as you can boot from the floppy and type:

sys c:

to make the hard disk bootable for DOS.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 8091090
Asker : Anonymous
Subject : Creating Partition(s)
Private : No

Question : When I, am creating a partition on a hard drive, I insert my boot diskette into the floppy drive and use the fdisk command at the A:\> prompt. For some reason I never get the option to answer the question: Do you wish to enable large disk support? The version I'm using is MS-Dos 6.22, can someone help me.

Answer : You are probably either using an older version of fdisk or DOS 6.22 is too old to support FAT32 (I suspect it's the latter since FAT32 support was not added until Windows 95 B, by which point the DOS versions were above 7 I believe).

Build a boot floppy on a Windows 95 B, or Windows 98 machine and their versions of fdisk will support FAT32 and give you that option at boot-time. Or you can download the one I've made available for you here:

http://ped.deadartists.com/idecd.cqm

Also get this utility used to extract the image to a blank floppy

http://ped.deadartists.com/copyqm.exe

and extract with this command:

copyqm a: playback=c:\whereever\idecd.cqm

Put in the blank floppy when prompted.

This disk has the version of fdisk and DOS that you need to be able to setup your disk with FAT32 - this disk is the one I use and may have some dangerous BAT files and such on it so do not run any of them unless you have examined them first.


--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8091093
Asker : helmutlang81
Subject : how to install ms dos in win xp pro
Private : No

Question : hi! i would like to find out how to install ms dos in my windows xp pro. thanks

Answer : Windows XP already has a DOS command-line interpreter - go to Start/Run and type cmd and hit ENTER. That's as close to DOS as Windows XP gets.


----------------------------------------------------------------------
QAId : 8094639
Asker : stefburn1
Subject : Data Recovery using DOS
Private : No

Question : Hello,

I would like to recover a flat file.
A text file. I'm using Windows 3.1.
I tried using UNDELETE but could not
recover the file I'm looking for...

I wondered if there is a Windows 3.1
utility that helps like Norton or
is there another command in DOS
that works.

The file is from a software program called QNA. This was an early wordprocessing type software tool.

Help,
Stefanie

Answer : If DOS's undelete can;t find it it's unlikely to be recoveable. But here are a few utilities to try - copy them to a FLOPPY and not the hard disk. Any changes you make to the hard disk (including from booting) risk your file since when a file is marked deleted its space is added to the free pool for available space. Any new file written, or existing file that is changed, has the potential to wipe out part or all of your file.

http://download.com.com/3120-20-0.html?qt=undelete+dos&tg=dl-2001

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

FUQuestion : I found a utility called RECOVER Fixed/Floppy which is suppose to work with a 16-bit OS such as this particular Win3.1. Have you ever used RECOVER?
I have heard that MS DOS's undelete doesn't work as well as DRDOS.
Read the information about RECOVER.
It doesn't seem to jibe with what you
mentioned about 'any new file written, or existing file that is changed has the potential to wipe out part or all of your file'
This data recovery tool is supposed to work with the hardest to recover files.

Thanks in advance
Stef

Answer : There's no file harder to recover than any other. But whether the program's documentation "jibes" with my description or not, mine is accurate. Once a file is "deleted" the data for that file still exists on the hard disk (or you wouldn't even be trying to undelete it, would you?). Once marked as deleted, however, the speace that file occupies is added to the free space pool, meaning with every disk write performed there is a chance the clusters your file occupied may be allocated for a new file or a modified one that is rewritten.

I have no experience with this RECOVER utility but whatever tool you're going to try I suggest that sooner is better than later in terms of when to try it. So let me know how it goes.
Rating : 3


----------------------------------------------------------------------
QAId : 8117400
Asker : junorezo
Subject : NTFS in dos
Private : No

Question : i cant find my harddrive in dos... the fileformat on tha hd is NTFS and i suspect that is the reason. is there such bootdisc witch i can find my drive?

Answer : NTFSDOS Pro can read NTFS partitions from DOS, but little else can.

http://www.sysinternals.com/ntw2k/freeware/ntfsdospro.shtml

but here's the one free one I found:

http://www.ntfs.com/products.htm

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8117516
Asker : erik926985
Subject : Batch file problem
Private : No

Question : Hi ,

i need to write a batch file for school
but i couldnt get a thing right
i wrote a autoexec.bat file with a menu in it
you could choose if you want to go to windows (95) or dos after some trouble i got that working but what the next assigntment is is that if you go to the dos prompt it also needs to load a new menu where should be 3 functions in it (lotus ,dbase,and wp5.1 ) but i cant get it running right because if i click dos it FIRST should load command.exe and then go to the new menu but can't get it right is there someone who can help me? in this file down here there is no command.com fixed in it only switches between menu

http://www24.brinkster.com/gswfl/autoexec.txt

that is my "Test" plz dont watch the way i use error levels ;-) and only fix that if i press dos it loads c:\windows\command.com and than goes to the new menu with lotus

i would thank you VERRY VERRY VERRRRY much :)

Greets Erik (from holland)

Answer : OK I've got you fixed up, and I've enhanced it a lot (maybe too much). The version I've written based on yours is below. Some observations on your version:

1) You had the mode commands at the bottom, where they would never be run since you were looping back up above in the file in all cases. Solution: I moved it to the top, before the start label, so it gets run once (and only once) before execution really begins.

2) I changed the syntax of your "choice" command. You had this for yours:

choice:/c12

which is really not accurate. All DOS commands should come first, followed by a space, and then the optional switches/parameters. In your case you had no space and miswrote the parameter.

The correct form of yours is:

choice /c:12

I added some features to it if you'd like to use them and ended up with this:

choice /n /t:1,15 /c:12 Keuze:

"/n" disables the printing of the choices - they're in the menu so you don't need to print them again - this makes for cleaner output.

"/t:1,15" sets a time limit (in this case 15 seconds) for the user to make their choice, after which time the default choice (in this case menu option #1) is chosen for them. This is a good way to have a menu appear and have it default to enter Windows after a given number of seconds.

"/c:12" is the correctly-written form of what you had originally. This defines allowed values from the user.

"Keuze:" is the prompt will see below the menu

Note also I added the line:

echo.

just after the menu draws but before the user is prompted. This draws a blank line and is useful for making things neat.

3) I changed the Windows section a bit, having it echo a "Starting Windows now" type of message instead of actually launching Windows for easier testing. Also notice that I changed it to goto "end" (a new label I added at the bottom) instead of "start" since once you're inside Windows your BAT menu won't reappear anyway (it may after you exit Windows but I'm not sure about that - if it does then change this back to "start").

4) I'm not sure what you meant by "that is my "Test" plz dont watch the way i use error levels ;-)" but your ERRORLEVEL tests in the second menu were wrong. You need to check errorlevel in reverse order, starting with the highest number first. Note that I added a 4th menu option, 'Return'. This will allow the user to come back to the "Windows/DOS" menu from the application menu.

5) Notice the lines:

echo Running WordPerfect... hit ENTER to continue
pause >nul

These will send a message to the user about what app they've chosen to run, and wait for them to press ENTER before continuing. The second line is what pauses execution until they press ENTER. By default "pause" will put a message to the screen similar to what we stated in the line above (without the WordPerfect portion we need, obviously) but wince we're redirecting standard out to nul it's not seen. This is a clean way to pause execution, while displaying the message you want.

Finally I changed some of your multilines like this:

cd\
cd windows

to this:

cd \windows

It's important to understand that root (\" means root whether it's by itself (cd \) or whether it's at the beginning of a path (cd \windows).

I hope I haven't helped too much, but I can't leave something like that alone once I start on it!

Good luck!

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities




@echo off
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb us,,C:\WINDOWS\COMMAND\keyboard.sys

:start
cls
echo IIIIIIIIIIIIIIIIIIII¯
echo § Menu §
echo IIIIIIIIIIIIIIIIIIIII1
echo § §
echo § §
echo § 1. Windows §
echo § 2. Dos §
echo § §
echo § §
echo EIIIIIIIIIIIIIIIIIIII¬
echo.
choice /n /t:1,15 /c:12 Keuze:

if errorlevel 2 goto dos
if errorlevel 1 goto windows

:windows
cd \windows
rem win
rem commented out the line above so we don't actually go to Windows while testing
echo You chose Windows!
rem goto start
rem Here, I would go to end instead of start since Windows will be loading
goto end

:dos
cls
echo IIIIIIIIIIIIIIIIIIII¯
echo § Menu §
echo IIIIIIIIIIIIIIIIIIIII1
echo § §
echo § §
echo § 1. WP 5.1 §
echo § 2. DBASE IV §
echo § 3. LOTUS §
echo § 4. RETURN §
echo § §
echo EIIIIIIIIIIIIIIIIIIII¬
echo.
choice /n /c:1234 /t:4,30 Keuze:

if errorlevel 4 goto start
if errorlevel 3 goto LOTUS
if errorlevel 2 goto DBASE
if errorlevel 1 goto WP

:wp
echo.
echo.
echo Running WordPerfect... hit ENTER to continue
pause >nul
cd \wp51
wp
goto dos

:DBASE
echo.
echo.
echo Running DBASE... hit ENTER to continue
pause >nul
cd \DBASE
dbase
goto dos

:LOTUS
echo.
echo.
echo Running Lotus... hit ENTER to continue
pause >nul
cd \lotus
lotus
goto dos

:end
echo.
echo.
echo Exiting...
cd \

FUQuestion : maybe i cant say it :) but i love ya :) only had to change a little bit (you typed it english and i am dutch :) and if you typed dos you were going to the menu but... i changed it to dos menu
and i will make a diiferent DOS so you REALLY could go to dos but i really thank you for this and i will rate your answer ofcourse *****
Rating : 5

Answer : You're quite welcome! I'm glad I could help.


----------------------------------------------------------------------
QAId : 8119437
Asker : Anonymous
Subject : DOS Networking commnd....
Private : Yes

Question : What is the DOS command that shows you all the active connections on the internet that you have up??

Answer : netstat -a

and

netstat -an


will show your active connections.
Rating : 5
End :


----------------------------------------------------------------------
QAId : 8119527
Asker : Anonymous
Subject : DOS Networking commnd....
Private : No

Question : What is the DOS command that shows you all the active connections on the internet that you have up??

Answer : netstat -a

or

netstat -an
Rating : 5


----------------------------------------------------------------------
QAId : 8124674
Asker : teufel
Subject : DOS bootdisk error
Private : No

Question :
I'm using a PC w/ME. I received info about fdisk /mbr. Tried it and it was effective. I figgered that since I was
already in DOS, I'd try scanreg /restore
to go back to May 30. After a reboot in DOS, the A prompt revealed "Command Interpreter is either missing or corrupt. Type command(e.g., C:\WINDOWS\COMMAND.COM."

After several repeated typings and same error messages, I retreated to Windows, copied its command.comand pasted in to my Windows98 DOS Boot disk. Additional error message: "Incorrect DOS version."

How can I correct these errors? The correction is especially needed for
Circuit City repair tech's to interactively(I'm bedridden) test and
advise either repairs or replacement of a non-working, never-used cd-rw drive.
The drive is in a Sony Vaio desktop purchased in 3/2001.

Answer : Windows ME has a feature called System Restore. It is in "Start/Programs/Accessories/System Tools" I believe. Open that and see if it has a snapshot for a date you'd like to put your machine's state back to. If so select it and it will likely fix your file issues since it tracks changes to the drive.

Another thing is to check the versions of command.com you find on the system (anywhere on the system) and ensure that any versions found are the correct ones that came with Millenium (check it by examining the .CAB files (with WinZip or extract.exe) that came on the Millenium install CD (or sometimes stored locally in C:\WINDOWS\OPTIONS\CABS). If you find the versions don't match use "extract.exe /e blahxx.cab command.com" to get the real file out and copy that version over the bogus ones.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8145688
Asker : erik926985
Subject : wipe your hard drive
Private : No

Question : Hi,

i found this site on the internet

http://www.gnujobs.com/Articles/14/Wipe_It.html

is there any possibility to make something like that in a batch file?

greets erik

Answer : Here's one I wrote to wipe the data (below). It works by writing data over the top of your deleted data, making it less likely to be retrievable. If you want to really be sure you should format and then run this until the drive is full, and perhaps repeat a time or two if you're really paranoid about making sure the data is non-recoverable.

@echo off
REM This program will overwrite free space on your hard disk by creating very large files.
REM DOS and Windows have a single-file limit of 2GB usually so if your drive is large
REM you will need to run this more than once to create
REM enough files to fill all the space on your disk.
REM Make sure you've deleted as much data as possible - the best case
REM being that you've formatted the disk and booted from floppy
REM before running this utility (copy the BAT file to C: first before running,
REM and make your current dir C:\
REM
if exist bs9.txt ren bs10.txt
if exist bs8.txt ren bs9.txt
if exist bs7.txt ren bs8.txt
if exist bs6.txt ren bs7.txt
if exist bs5.txt ren bs6.txt
if exist bs4.txt ren bs5.txt
if exist bs3.txt ren bs4.txt
if exist bs2.txt ren bs3.txt
if exist bs1.txt ren bs2.txt
echo Please enter some text (a few lines worth)... when done hit CTRL-Z and hit ENTER
copy con bs.txt >nul
echo.
echo Now erasing your drive by wasting space at a phenomenal rate...
type bs.txt >> wasted.txt
:start
type wasted.txt >> wasted.txt
goto start


--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities


Answer : Oops - I used "bs.txt" examples above, which were what I used in testing. That section is not real useful so just rename "c:\wasted.txt" to something else after each run:

c:
ren wasted.txt wasted1.txt

for instance. Then run the BAT file again and ren again:

c:
ren wasted.txt wasted2.txt

until you've used all your available hard disk space.

Another note - you'll know each run is complete when you start getting messages about being out of disk space - that's when you'll need to hit CTRL-C to stop that run and rename.




----------------------------------------------------------------------
QAId : 8173183
Asker : AL_TAREQ33507
Subject : format in batch file
Private : No

Question : Hello
if I want to add a format command to a batch file how to answer the confirmation question in the batch file
thanks.

Answer : To make the format command proceed without prompting you can do this:

format x: /u /autotest

(be careful testing this as it will start formatting "x:" immediately!)

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities



----------------------------------------------------------------------
QAId : 8173186
Asker : Anonymous
Subject : cd rom in dos
Private : No

Question : how can i access my d drive in msdos mode?

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*.* 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://home.attbi.com/~bitbucket911/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://home.attbi.com/~bitbucket911

FUQuestion : I am fairly new so please---when you say creat a config.sys you mean type this into the file
device=\himem.sys
device=\idecd.sys /d:cdrom001
In the autoexec.bat, you say put in this
@echo off
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096

do you mean type it in?
please don't laugh at me, i know i can do this with your help thanks and you get a top rating

Answer : Yes you can enter the text with a text editor like Notepad inside Windows before you reboot. Or if you find yourself without Windows to create the boot floppy, you can use the DOS "edit" command to edit and save the new file. Or finally you can do it this way with no tools at all, from a DOS prompt (hit ENTER after each line):

a:
copy con config.sys
device=\himem.sys
device=\idecd.sys /d:cdrom001
^Z

copy con autoexec.bat
\mscdex.exe /d:cdrom001 /l:f
\smartdrv /n c+ f 4096 4096
^Z

Where it says "^Z" above that means hold the CTRL key and then press the Z key.


That procedure will leave you with the files you need to boot, if you've done everything else I mentioned above.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

End :
Rating : 5


----------------------------------------------------------------------
QAId : 8173194
Asker : Anonymous
Subject : dos mode
Private : No

Question : can someone tell me how to make my cd-rom work in real mode? when I restart in msdos mode and put rhe cd in my d drive nothing happens exept the light on the front of my d drive comes on for a few seconds and then gos off. I have a c prompt and i don't know what to do

Answer : You will want this page for the method to configure dosstart.bat and a separate config.sys to load the CD-ROM drivers:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q138996&

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities





----------------------------------------------------------------------
QAId : 8173215
Asker : cooksuzy
Subject : starting in MS DOS
Private : No

Question : Hi, back again.
I run Windows ME on an Intel Celeron 333Mhz (equivalent Pentium II). I have used various boot and start up disks, have tried F8, but I cannot get my computer to start in MS DOS. With the boot disks, my computer starts as normal, and with F8, I get a DOS screen with 4 options: Log on, Normal, Safe Mode & Step-by step. None of these seem to help me. I need step-bystep instructions on this. I'm at my wits end. Please help!
Suzy

Answer : Windows ME does not have a DOS boot choice. I suggest you create a boot floppy with Windows 98 and use it when you want access to a pure DOS environment and access to your hard disk via DOS.
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*.* 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://home.attbi.com/~bitbucket911/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://home.attbi.com/~bitbucket911



----------------------------------------------------------------------
QAId : 8175996
Asker : sona32
Subject : DOS questions
Private : No

Question : Hello mr.expert, i have some doubts in DOS. please help and oblige.

Que 1. Why does DOS create two directories . and .. in every directory created. What is the purpose of these two special directories?

Que 2. Is there any way to rename DOS Internal Commands (I know that thease are part of Command.COM) if Yes, Please explain HOW ?

Que3. How DOS manages Internal Memory ?What is Extended Memory and Expanded Memory ? What is there need ? Are they required in case of Windows Operating Sysetm Also ?

Waiting for the answers..
Thanks a lot.
Sona.

Answer : Hello,

1) The directories "." and ".." are symbolic references to the current directory, and the parent directory, respectively. They are shortcuts you can use to refer to these two items. So for example if you are in this directory:

c:\mystuff\where

and you want to copy the file "program.exe" from there to c:\mystuff you could do it like this:

copy program.exe c:\mystuff

but it's easier and uses less keystrokes to use the ".." shortcut:

copy program.exe ..

which will have the same effect, since the parent of your current directory is c:\mystuff.

2) I know of no way to supplant the internal commands - they are part of command.com. Even if you create a BAT/COM/EXE file of the same name, internal commands are checked first so your file would be ignored (unless you specified an extension when you ran it). I suppose if you used debug.exe or a hex editor you could rename some of the commands in command.com.

3) DOS uses conventional, expanded and extended memory. Conventional memory is the first 640K of the first megabyte of system memory. The range between 640K and 1024K (the rest of the first megabyte) is called the high memory area. The first PC processor the 8088 had a 1 MB memory access limit and this is where this limitation came from, since all later processors were backwards-compatible with it.

Expanded and extended are the methods by which memory above 1 MB are recognized and used by the later CPUs that could address more memory. Expanded is an older standard that used pages to access memory above 1 MB and is considered obsolete now. Both expanded and extended modes of accessing memory above 1 MB require the use of the CPU's "protected" mode, which allows the CPU to use more of its full capabilities. Windows uses extended memory addressing for those versions of Windows based on DOS (Win9x).

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8187787
Asker : snail880
Subject : Command
Private : No

Question : Hi expert,

For instance we have restarted our PC in Ms-Dos
and later we wanted to revert to the graphical
interface. What is the command at the Dos Prompt
that we can type to revert to the GUI without
pressing the restart button.


Yours sincerely,
snail

Answer : Type:

exit

and hit ENTER.
Rating : 5


----------------------------------------------------------------------
QAId : 8191948
Asker : general_useuk
Subject : cd rom format
Private : No

Question : please help!!!

i ve just received a CD ROM from an arabic country. i tried to use it on my windows 98 and got funny characters. do i have to have special operating system or special patch to use it?? please

Answer : It was created with a different region setting. Try changing your settings in the "Regional and Language" control panel.


----------------------------------------------------------------------
QAId : 8235285
Asker : gdscore
Subject : batch file commands
Private : No

Question : Two questions:
(1)
Am using the following batch file line to hold a . jpg for 5 seconds before going to the next command. When the next command takes affect, the .jpg remains on the screen behind the new active window. Is there a batch command that will close it?

type nul | choice.com /n /cy /ty,5 >nul

(2)
Is there a batch command that will associate" *.aml" with "amlp.exe" if another or no association exist in the Windows operating system being addressed?

Answer : 1) It would help if you showed the whole BAT file and not just one line. It's not clear how you're showing the picture, so showing us how you're timing the picture really isn't the information needed to answer your question. That being said, however, if the app you're using displays images in a DOS window (supplanting the DOS prompt) you might try a "cls" command to clear the screen.

2) There are no associations in DOS, so it seems what you're asking for is a way to create associations from DOS. I've never seen this but this app looks promising (it's mostly GUI but it may support command-line invocation) - http://www.filelibrary.com:8080/cgi-bin/freedownload/Windows/q/123/ratri.zip

A better idea than changing their associations would be to simply invoke their copy of "amlp.exe" and pass the parameter of the drive, path and filename of the *.aml file you wish to load:

Example:

start "c:\program files\myapp\amlp.exe" "c:\wherever\my files\thisfile.aml"

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8249334
Asker : gthiemann
Subject : Looking for Command
Private : No

Question : Today as I was working on my email, the cursor froze. I tried a warm boot but nothing. Then I shut off the computer, and restarted it. But a blue screen comes up to say:

"A problem has been detected and windows (XP) has been shut down to prevent damage to your computer.
"If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps:
"Disable or uninstall any antivirus, disk defragmentation or backup utilities. Check your hard drive configuration, and check for any updated drives. Run CHKDSK /F to check for hard drive corruption, and restart your computer."

My problem is that I can't get to a command prompt to do the CHKDSK /F. What to do?

Thanks.

Gene Thiemann

Answer : Try booting into safe mode - press F8 as the system begings to boot and you should see a menu appear - if you miss it press CTRL-ALT-DEL and try again. Choose the Safe mode when you get the menu and then once in Windows open a DOS prompt by:

Start/Run

then type in:

cmd

and hit ENTER. Once in the prompt type:

chkdsk /f c:

and it will either scan right then or will tell you it needs to scan on reboot. Another thing you may try after that is to do the F8 menu again and choose "Last known good config" which will reinstantiate the configuration as it was the last time you successfully booted to the desktop. In fact this maybe should be the *first* thing you try, before the chkdsk.

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


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

Question : hi
i was wondering how i would copy files from say c:\ to another drive that is on network.

i have tried straight off
xcopy c:\filename f:\
but it doesn't work

ive also read somewhere that you go:
xcopy c:\filename \\networkcompname\f\

but it looks wrong coz its just "f" and not"f:\"
can you please tell me if its just "f" or is it "f:\", or please tell me how i can copy over the network if it is possible

thankyou

Answer : First thing please title the subject of your question something other than the category. Asking a question called "MS-DOS" in the MS-DOS category is like naming your dog "dog".

OK as to your question:

I just tried a copy using this syntax and it worked:

xcopy file \\server\sharename

That test was done in Windows 2000

Yours should work too if you're using Windows 2000 or XP, and maybe even under 98 or ME.

Also you could just temporarily map the drive:

net use z: \\server\sharename
xcopy file z:\
net use z: /delete

Answer : Another way to copy without mapping a drive first (which it appears now on second look that you were trying to do with your copy to \\networkcompname\f\") is like this:

xcopy file \\networkcompname\f$

All the valid drive letters of a machine that is joined to a Windows domain automatically have an administrative share by that drive letter with a dollar sign (makes it a hidden share). So the form above may work for you as well. So for example if you wanted to copy to a remote machine's D drive into a subdirectory called "mystuff":


xcopy file \\machine\d$\mystuff

Rating : 4


----------------------------------------------------------------------
QAId : 8278858
Asker : gthiemann
Subject : Looking for Command
Private : No

Question : Today as I was working on my email, the cursor froze. I tried a warm boot but nothing. Then I shut off the computer, and restarted it. But a blue screen comes up to say:

"A problem has been detected and windows (XP) has been shut down to prevent damage to your computer.
"If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps:
"Disable or uninstall any antivirus, disk defragmentation or backup utilities. Check your hard drive configuration, and check for any updated drives. Run CHKDSK /F to check for hard drive corruption, and restart your computer."

My problem is that I can't get to a command prompt to do the CHKDSK /F. What to do?

Thanks.

Gene Thiemann

Answer : Start pressing F8 as soon as the memory test/POST information completes. A menu will appear - use it to choose repair options or try to start in Safe mode. If you go in under Safe mode, once at the desktop open a DOS prompt by going to Start/Run and type in cmd and hit ENTER. Once there run this:

chkdsk /f c:

Rating : 5


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

Question : hi
i was wondering how i would copy files from say c:\ to another drive that is on network.

i have tried straight off
xcopy c:\filename f:\
but it doesn't work

ive also read somewhere that you go:
xcopy c:\filename \\networkcompname\f\

but it looks wrong coz its just "f" and not"f:\"
can you please tell me if its just "f" or is it "f:\", or please tell me how i can copy over the network if it is possible

thankyou

Answer : First thing please title the subject of your question something other than the category. Asking a question called "MS-DOS" in the MS-DOS category is like naming your dog "dog".

OK as to your question:

I just tried a copy using this syntax and it worked:

xcopy file \\server\sharename

That test was done in Windows 2000

Yours should work too if you're using Windows 2000 or XP, and maybe even under 98 or ME.

Also you could just temporarily map the drive:

net use z: \\server\sharename
xcopy file z:\
net use z: /delete

Another way to copy without mapping a drive first (which it appears now on second look that you were trying to do with your copy to \\networkcompname\f\") is like this:

xcopy file \\networkcompname\f$

All the valid drive letters of a machine that is joined to a Windows domain automatically have an administrative share by that drive letter with a dollar sign (makes it a hidden share). So the form above may work for you as well. So for example if you wanted to copy to a remote machine's D drive into a subdirectory called "mystuff":


xcopy file \\machine\d$\mystuff
Rating : 4


----------------------------------------------------------------------
QAId : 8314270
Asker : weswes2000
Subject : Smart drive
Private : No

Question : Hi there ,

When i were installing WinXP , the setup displayed that i dont have " Smartdrive " and that it will greatly improve the installing process and i must exit the setup , and run Smartdrive from the DOS ,
how can i do this ??

Could anyone help plz...
Thanks..

Answer : Depending on how you're starting the install SmartDrive can be added. If you already have DOS installed on the drive you can add the following files/changes to enable smartdrive:

Copy the following files to C:\ from a Windows 98 or 95 install or floppy:

himem.sys
smartdrv.exe

Edit the C:\CONFIG.SYS to contain:

device=\himem.sys

Edit the C:\AUTOEXEC.BAT to contain:

\smartdrv.exe /n c+ d f 16384 16384

Now when you reboot on your C: drive into DOS you will have SmartDrive active. In doing this I would suggest you ALSO make your CD-ROM drive available by adding the following file and changes:

Download http://ped.deadartists.com/idecd.sys - save it to C:\

Edit config.sys:

device=\idecd.sys /d:cd01

Copy the file mscdex.exe from 98/95 source to C:\

Edit autoexec.bat (put this line BEFORE the smartdrv line):

\mscdex /d:cd01 /l:f

If necessary you will also need to "sys" the hard disk with sys.com from a bootable floppy (you can create such a disk from Add/Remove Programs - Startup Disk tab in your 98/95 control panel). Boot from the floppy and then type:

sys c:

to make the hard disk bootable to DOS.

Now when you reboot on the hard disk you will have your CD-ROM drive available and SmartDrive. At that point I'd suggest copying the install files for XP to the hard disk:

md c:\i386
copy f:\i386\*.* c:\i386

OR

xcopy f:\i386\*.* c:\i386\*.* /e

if you've gotten all the xcopy*.* files from your 98/95 machine.

Now you can reboot from the hard drive and issue these commands to start the install:

c:
lock c: /off
cd \i386
winnt

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5


----------------------------------------------------------------------
QAId : 8327650
Asker : shai14
Subject : contact
Private : Yes

Question : Dear Sir,
Sincere the AskMe is going to be shutdown in near future.If you don't mine can you give me your personal email so that I can contact you in future.Thank you for your conisderation and Bye.

Answer : merlin@fallnangels.de


----------------------------------------------------------------------
QAId : 8336322
Asker : t1stranger40
Subject : formating disk
Private : No

Question : I get a message" If you have HPFS or NTFS installed on your HD you will need to create an MS-Dos Boot Partition to set up windows" Would like to install windows on disk I formated but it is fat16 how do I change it to 32 the drive is 8m

Answer : The drive is 8m? Do you mean it's an 8MB hard drive? Or perhaps 8 GB?

A FAT16 partition is just as capable of working as a FAT32 so that isn't your problem. If you would rather make a FAT32 partition use a Windows 95 OSR2 or later (Windows 98, ME) bootdisk with fdisk.exe on it to make a new partition. You'll know you have the right fdisk since when you run it, it will first ask if you want to enable large disk support - that's code for "FAT32" and if you answer Yes any partition you create during that session will be a FAT32 partition. Then format it:

format c: /s /u

If you have no data on the drive and Windows is complaining about the partition type there may have been a problem with the partition that you created. You may need a utility other than fdisk to remove the partition if it's not seen as a valid DOS partition. Use the utility below if you have trouble removing it with fdisk:

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

--
Paul Doherty
http://home.attbi.com/~bitbucket911
DOS/Windows Utilities

Rating : 5

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

Return to AskMe Archive Main Page

Return to Main PowerUsers.info Main Page