Jump to content

auromate chkdsk in xp


Recommended Posts

Posted

I made batch file to be run with the Schsduler for chkdsk.exe once a month, only it ask for an answer "Y/N"

How to insert the answer "y" in the batch fie?

Thnks


Posted

You could try using fsutil to set the dirty bit to invoke chkdsk.

fsutil dirty set c:

You can change c: to the drive of your choice.

Posted (edited)

I haven't done this in years, but I think it was:

Echo /y > chkdsk

or maybe it was:

Echo /y | chkdsk

It then passes the /y entry off to the program after the > symbol.

If I'm wrong, I know someone will jump on an opportunity to correct me. That never fails. :thumbup

How soon we forget how to do things like program in DOS, when we don't use it often.

I still write and use batch files on a daily basis,,,,I just don't use that command.

Good Luck,

Andromeda43

Edited by Andromeda43
Posted

I just tried chkdsk in a batch file and it ran without asking me any questions.

What question does it ask you?

And are you using any switches after chkdsk? Here's the list:

Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/C] [/L[:size]]

volume Specifies the drive letter (followed by a colon),

mount point, or volume name.

filename FAT/FAT32 only: Specifies the files to check for fragmentation.

/F Fixes errors on the disk.

/V On FAT/FAT32: Displays the full path and name of every file

on the disk.

On NTFS: Displays cleanup messages if any.

/R Locates bad sectors and recovers readable information

(implies /F).

/L:size NTFS only: Changes the log file size to the specified number

of kilobytes. If size is not specified, displays current

size.

/X Forces the volume to dismount first if necessary.

All opened handles to the volume would then be invalid

(implies /F).

/I NTFS only: Performs a less vigorous check of index entries.

/C NTFS only: Skips checking of cycles within the folder

structure.

The /I or /C switch reduces the amount of time required to run Chkdsk by

skipping certain checks of the volume.

*************************

I'm really curious about that error message.

Cheers,

Andromeda43

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...