Schedule Chkdsk

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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
 
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
 
Back
Top