June 28th, 2004, 11:55 PM
|
#1 (permalink)
| | Junior Member
Join Date: Jun 2004 Location: pa. us of a
Posts: 15
| DOS batch file for running CHKDISK? Can it be done?
I want to just write a batch file to stick in My Documents folder that I can click on and it would run chkdisk (checkdisk sp?), or scandisk (whichever is better).
Can this be done while running WindowsXp Pro, or windows period?
DOS stands for disk operationg system, so it falls into Software category.
let's see what we can come up with
I don't want to see the dos window
I don't want to have to manually exit out of a dos window
I DO want to see the chkdisk, scandisk, whatever program running - (i don't want it in background)
I wouldn't mind if program exits out on own IF NO PROBLEM FOUND
ok, there's the parameters (or paramaters), for the batch file, if possible
Thanks for your work in advance,  |
| |
June 29th, 2004, 12:17 AM
|
#2 (permalink)
| | ᅟᅠ
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,426
| Quote: |
Originally Posted by Abi Normal I want to just write a batch file to stick in My Documents folder that I can click on and it would run chkdisk (checkdisk sp?), or scandisk (whichever is better).
Can this be done while running WindowsXp Pro, or windows period?
DOS stands for disk operationg system, so it falls into Software category.
let's see what we can come up with
I don't want to see the dos window
I don't want to have to manually exit out of a dos window
I DO want to see the chkdisk, scandisk, whatever program running - (i don't want it in background)
I wouldn't mind if program exits out on own IF NO PROBLEM FOUND
ok, there's the parameters (or paramaters), for the batch file, if possible
Thanks for your work in advance,  | 1. There's no such thing as "DOS" anymore, so explaing what it is an acronym for seems odd.  But I still call them DOS boxes too.
2. You can't run chkdsk with the /f switch on the Windows root drive (the drive Windows is installed on) or on a drive that contains the Windows swap file while Windows is running. If you try it will just prompt you with a yes/no question: Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)
However, you can run chkdsk without the /f switch and it will go through the motions of checking the filesystems and tell you whether or not it has found any errors. But it will not fix anything unless you use the /f switch.
3. You say you don't want to see a Command window (DOS box) but you do want to see chkdsk running....? chkdsk runs in a command window... so which is it? You want to see it or not see it? |
| |
June 29th, 2004, 03:27 AM
|
#3 (permalink)
| | Junior Member
Join Date: Jun 2004 Location: pa. us of a
Posts: 15
|
Let's not forget our dear friends mr. fdisk and mrs. format!
here's what i've come up with.
EDITED BECAUSE YOU CAN SEE THE FOLLY OF MY THINKING CLEARLY DEMONSTRATED BELOW
Thanks for help !!!
Last edited by Abi Normal : June 29th, 2004 at 04:37 AM.
|
| |
June 29th, 2004, 03:42 AM
|
#4 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,143
|
What this batch does ->
echo y
//set echo on, nothing here.
chkdsk c: /f /R /X
//check disk c, do nothing with the results.
chkdsk d: /f /R /X
chkdsk > Ddrive.cfe
//check disk d, after that, check disk c and append what happens to ddrive.cfe.
What you'd want to do, is 'chkdsk d: /f /r /x >> ddrive.cfe'
chkdsk e: /f /R /X
chkdsk > Edrive.cfe
//same as above, substitute d with e
chkdsk f: /f /R /X
chkdsk > Fdrive.cfe
//and substitute d with f
chkdsk g: /f /R /X
chkdsk > Gdrive.cfe
//d with g
Dir *.cfe > disklog.txt /b
//append listing of *.cfe files to 'disklog.txt' Why you want to do this, is beyond me.
del *.cfe
//delete the created logs
notepad "e:\Batch Files\disklog.txt"
//launch notepad to view *.cfe files. Again, why you'd want to do this is beyond me.
Your batch doesn't really do anything useful, and even if you do 'chkdsk <driveletter> /f /x /y >> c:\temp\drivelog.cfe it will be VERY garbled. Just try it, go to prompt and type 'chkdsk d: >> c:\temp\dlog.txt'
Then check out the resulting txt file (which your original batch doesn't even use beside for filename. |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |