mzik Posted September 25, 2005 Posted September 25, 2005 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
MHz Posted September 26, 2005 Posted September 26, 2005 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.
Andromeda43 Posted September 26, 2005 Posted September 26, 2005 (edited) I haven't done this in years, but I think it was:Echo /y > chkdskor maybe it was:Echo /y | chkdskIt 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. 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 September 26, 2005 by Andromeda43
Andromeda43 Posted September 26, 2005 Posted September 26, 2005 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 byskipping certain checks of the volume.*************************I'm really curious about that error message.Cheers,Andromeda43
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now