home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Applications and Operating Systems
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Topic: 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...
Reply Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1845
Discussions: 184,706, Posts: 2,205,621, Members: 227,429
Old June 28th, 2004, 11:55 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jun 2004
Location: pa. us of a
Posts: 15
Lightbulb
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,

Abi Normal is offline   Reply With Quote
Old June 29th, 2004, 12:17 AM     #2 (permalink)
ᅟᅠ
 
OuTpaTienT's Avatar
 
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?

OuTpaTienT is offline   Reply With Quote
Old 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.
Abi Normal is offline   Reply With Quote
Old 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.
muno is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup over mapped network drive problem implexant Networking and Internet 5 December 5th, 2003 02:13 PM
lose DOS screen after batch file? John Prophet Applications and Operating Systems 1 October 11th, 2003 01:49 AM
Batch files for DOS gideon27 Applications and Operating Systems 3 July 7th, 2003 08:43 PM
writing batch files ... rh71 General Tech Discussion 2 August 15th, 2002 09:36 PM
tally up frequency of a string and write it to a file...? Chooco Webmastering and Programming 4 February 28th, 2002 05:35 AM

Most Active Discussions
Password (8)
Is It Just Me? (13864)
John McFlIpFlOpPeR - for Bingo =) (50)
Building my first desktop (18)
Death of the Republican Philosophy (5)
Weirdest case ever... (13)
Problem With IDE Hard Drive (9)
Graphics Card for COD 4 (9)
so u cant crossfire with a HD 4850 .. (9)
Recent Discussions
Password (8)
need help hosting online (2)
Mozilla Firefox problem (7)
ATI RADEON 9800 PRO AGP power c.. (1)
Problem With IDE Hard Drive (9)
FS: Microsoft Zune 30GB (1)
Javascript "carousel".. (1)
Format new HDD (4)
Laptop Purchase Help (13)
RAID 5 - Upgrade to bigger hard.. (2)
Xbox 360 games and Samsung Sync.. (2)
WTB: Nokia N95-4 8GB black (3)


All times are GMT -4. The time now is 08:00 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28