Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

help with a .bat file


  • Please log in to reply

#1
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I am leaning to use bat files (will go on to other methods when I get visual stuido - it is in the mail) and on the .bat file that I am playing with that I wrote the first line is chkdsk C: /x /r when the file is exeacuted it comes up as expected "Chkdsk could not run because the volume is in use by an other process. Would you like to schedule this volume to be checked next time the system restarts? (Y/N) I all ways wan't to say Y. how can I put this responce into the .bat file I have tryed several things but none work.

Edited by Michael Buckley, 04 August 2005 - 02:07 AM.

  • 0

Advertisements


#2
inoxx.net

inoxx.net

    Member

  • Member
  • PipPip
  • 16 posts
im not sure, im pretty crappy with batch, try /q (q is no alert)
  • 0

#3
Michael

Michael

    Retired Staff

  • Topic Starter
  • Retired Staff
  • 1,869 posts
It says it is an invalid parameter. What else can I try.
  • 0

#4
darth_ash

darth_ash

    Member 1K

  • Member
  • PipPipPipPip
  • 1,382 posts
The /r switch for chkdsk needs dirve to be unmounted, as it checks for physical errors. The /r switch can only be run on next reboot, or from the Recovery Console.
Use only chkdsk C: /x (if the partition is NTFS).
  • 0

#5
Michael

Michael

    Retired Staff

  • Topic Starter
  • Retired Staff
  • 1,869 posts
I know what the /r switch dose and what it because I did have physical errors a few week ago which resulted in the computer not booting, so I want to keep a regular check and this is just part of the batch file (the bat file is part of something that I am making to learn how to write software, will use visual C# when I get it) it comes up with that message and I want to automatically say yes. I will need this in other parts of the .bat file I am sure when I get to writing it.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP