PC Review


Reply
Thread Tools Rate Thread

batch to run chkdsk on all local drives?

 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      6th Dec 2008

"Tyler Durden" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is possible? tried to find that, with no success. The batch should find
> all available local drives and do a chkdsk /f only to the next restart.
>
> Any help would be appreciated. Thanks!


You could run this command to check your NTFS partitions:
chkntfs /d


 
Reply With Quote
 
 
 
 
Tyler Durden
Guest
Posts: n/a
 
      6th Dec 2008
Is possible? tried to find that, with no success. The batch should find all
available local drives and do a chkdsk /f only to the next restart.

Any help would be appreciated. Thanks!


 
Reply With Quote
 
Tyler Durden
Guest
Posts: n/a
 
      6th Dec 2008
It must run on all local drives, including removable and fat32. Also, the
chkntfs /d run on volumes with dirty bit set, and errors could exist even
when this bit is not set.

"Pegasus (MVP)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Tyler Durden" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Is possible? tried to find that, with no success. The batch should find
>> all available local drives and do a chkdsk /f only to the next restart.
>>
>> Any help would be appreciated. Thanks!

>
> You could run this command to check your NTFS partitions:
> chkntfs /d
>
>



 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      6th Dec 2008
You could plug the appropriate data into the registry, using regedit.exe, as
per this KB article:
http://support.microsoft.com/directo...;EN-US;Q218461. Look
for the word "unconditional".


"Tyler Durden" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> It must run on all local drives, including removable and fat32. Also, the
> chkntfs /d run on volumes with dirty bit set, and errors could exist even
> when this bit is not set.
>
> "Pegasus (MVP)" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> "Tyler Durden" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Is possible? tried to find that, with no success. The batch should find
>>> all available local drives and do a chkdsk /f only to the next restart.
>>>
>>> Any help would be appreciated. Thanks!

>>
>> You could run this command to check your NTFS partitions:
>> chkntfs /d
>>
>>

>
>



 
Reply With Quote
 
charles
Guest
Posts: n/a
 
      7th Dec 2008
On Sat, 6 Dec 2008 14:12:27 -0300, "Tyler Durden" <(E-Mail Removed)>
wrote:

>Is possible? tried to find that, with no success. The batch should find all
>available local drives and do a chkdsk /f only to the next restart.
>
>Any help would be appreciated. Thanks!
>


@echo off
for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%x:\ echo.y|chkdsk %%x: /f)

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      7th Dec 2008
Have you changed your requirements? You initially wanted something that runs
chkdsk on the next restart. The current solution will run chkdsk immediately
on all non-locked drives.


"Tyler Durden" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> In a one-liner! But another question arises: since seems that the echo.y
> is valid on english systems, how always answer 'yes' on any OS language?
>
> Thank you charles.
>
>
> "charles" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> On Sat, 6 Dec 2008 14:12:27 -0300, "Tyler Durden" <(E-Mail Removed)>
>> wrote:
>>
>>>Is possible? tried to find that, with no success. The batch should find
>>>all
>>>available local drives and do a chkdsk /f only to the next restart.
>>>
>>>Any help would be appreciated. Thanks!
>>>

>>
>> @echo off
>> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
>> if exist %%x:\ echo.y|chkdsk %%x: /f)
>>

>
>



 
Reply With Quote
 
Tyler Durden
Guest
Posts: n/a
 
      7th Dec 2008
In a one-liner! But another question arises: since seems that the echo.y is
valid on english systems, how always answer 'yes' on any OS language?

Thank you charles.


"charles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sat, 6 Dec 2008 14:12:27 -0300, "Tyler Durden" <(E-Mail Removed)>
> wrote:
>
>>Is possible? tried to find that, with no success. The batch should find
>>all
>>available local drives and do a chkdsk /f only to the next restart.
>>
>>Any help would be appreciated. Thanks!
>>

>
> @echo off
> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
> if exist %%x:\ echo.y|chkdsk %%x: /f)
>



 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      7th Dec 2008

"Al Dunbar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "charles" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> On Sat, 6 Dec 2008 14:12:27 -0300, "Tyler Durden" <(E-Mail Removed)>
>> wrote:
>>
>>>Is possible? tried to find that, with no success. The batch should find
>>>all
>>>available local drives and do a chkdsk /f only to the next restart.
>>>
>>>Any help would be appreciated. Thanks!
>>>

>>
>> @echo off
>> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
>> if exist %%x:\ echo.y|chkdsk %%x: /f)

>
> But that would process mapped drives in addition to local ones. Perhaps
> this could be avoided by unmapping drives first, i.e.:
>
>> @echo off
>> net use * /del
>> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
>> if exist %%x:\ echo.y|chkdsk %%x: /f)

>
> /Al
>


This has nothing to do with the subject but your PC clock appears to be two
hours fast, or else your time zone is set incorrectly.


 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a
 
      7th Dec 2008

"charles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sat, 6 Dec 2008 14:12:27 -0300, "Tyler Durden" <(E-Mail Removed)>
> wrote:
>
>>Is possible? tried to find that, with no success. The batch should find
>>all
>>available local drives and do a chkdsk /f only to the next restart.
>>
>>Any help would be appreciated. Thanks!
>>

>
> @echo off
> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
> if exist %%x:\ echo.y|chkdsk %%x: /f)


But that would process mapped drives in addition to local ones. Perhaps this
could be avoided by unmapping drives first, i.e.:

> @echo off
> net use * /del
> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
> if exist %%x:\ echo.y|chkdsk %%x: /f)


/Al


 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      7th Dec 2008
Can't tell - this depends entirely on your requirements.


"Tyler Durden" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What would be the best/fastest option and why?
>
> 1) Set dirty bit on on all 'fsutil fsinfo drives', preceded by chkntfs /d
> and chkntfs /t:0 (leaving all the work to the restart)
> 2) Chkdsk /f on all unlocked volumes immediately, leaving the only locked
> volumes to the next restart
>
>
> "Pegasus (MVP)" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Have you changed your requirements? You initially wanted something that
>> runs chkdsk on the next restart. The current solution will run chkdsk
>> immediately on all non-locked drives.
>>
>>
>> "Tyler Durden" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> In a one-liner! But another question arises: since seems that the echo.y
>>> is valid on english systems, how always answer 'yes' on any OS language?
>>>
>>> Thank you charles.
>>>
>>>
>>> "charles" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> On Sat, 6 Dec 2008 14:12:27 -0300, "Tyler Durden" <(E-Mail Removed)>
>>>> wrote:
>>>>
>>>>>Is possible? tried to find that, with no success. The batch should find
>>>>>all
>>>>>available local drives and do a chkdsk /f only to the next restart.
>>>>>
>>>>>Any help would be appreciated. Thanks!
>>>>>
>>>>
>>>> @echo off
>>>> for %%x in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
>>>> if exist %%x:\ echo.y|chkdsk %%x: /f)
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to force CHKDSK on all local drives? someone watching Windows XP General 9 6th May 2010 01:40 PM
run Chkdsk at system start-up through Batch File John Abraham Windows XP General 1 12th Jun 2006 02:05 AM
Tarylynn - File Synchronizer - Local Drives, Network Drives, FTP to Server Mel Freeware 0 26th Jun 2005 03:29 PM
chkdsk-batch file for 4 parttitions B&P Windows XP New Users 7 9th Jun 2004 08:44 PM
Batch file for Chkdsk in Recovery Console Dusty Windows XP General 2 28th Jul 2003 06:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:23 PM.