Schedule Chkdsk

G

Guest

Hi,

I would like to schedule a weekly check disk on my Windows 2000 (and XP)
PCs. Here's my goal: a chkdsk c: /f command is issued in the background and
a Y for yes is supplied with no intervention. So the next time a user boots
up, chkdsk will run.

But I don't want to do this at every startup -- just weekly. I've tried
tinkering with a batch file with an echo y in it to answer yes for scheduling
the chkdsk at the next startup. But the batch file never seems to run based
on the task scheduler window.

Any thoughts on how to accomplish this?

Thanks very much!
 
P

Pegasus \(MVP\)

Frank said:
Hi,

I would like to schedule a weekly check disk on my Windows 2000 (and XP)
PCs. Here's my goal: a chkdsk c: /f command is issued in the background and
a Y for yes is supplied with no intervention. So the next time a user boots
up, chkdsk will run.

But I don't want to do this at every startup -- just weekly. I've tried
tinkering with a batch file with an echo y in it to answer yes for scheduling
the chkdsk at the next startup. But the batch file never seems to run based
on the task scheduler window.

Any thoughts on how to accomplish this?

Thanks very much!

Use the Task Scheduler to run the following batch file once every week:

@echo off
echo %date% %time% Start of chkdsk operation >> c:\chkdsk.log
echo Y|%SystemRoot%\system32\chkdsk.exe c: 1>>c:\chkdsk.log 2>&1
echo %date% %time% End of chkdsk operation >> c:\chkdsk.log
echo. ----------------------- >> c:\chkdsk.log
 
G

Guest

This is perfect. Thanks very much! I added a /f and chkdsk ran upon restart
Windows. The logging feature is a nice touch.

Thanks again!

Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top