Command to Rescan Disks in Disk Management for batch file
I'm looking for a command that I can put in a batch file that will automatically "Rescan Disks" See screenshot: http://img297.imageshack.us/img297/8277/rescandisks.jpg Basically I have a drive connected via ESATA and it only comes on sometimes, unless I rescan disks and then it always turns on. So I am trying to make a batch file with a command to rescan the disks, that I can then set to run using the windows scheduled tasks, at a certain time, so the computer will awake from sleep and then rescans the disks automatically.
September 8th, 2009 10:01am

We can run the following command to update disk information, it has the same function with the Rescan Disks in Disk Management: 1. Open Command Prompt under administrator. 2. Type: diskpart 3. At the DISKPART prompt, type: rescan For more information, you can refer to the following article: Update disk information To create a BAT file, you can refer to the following steps: 1. Click "Start", in the Search box, type: "notepad" (without quotes) and press Enter. 2. Type the following command into the opened Notepad window: rescan 3. Please close the Notepad window. Choose Save when you are prompted to save the file. Type "rescan.txt" as the file name and choose Desktop from the left panel as the location. 4. Open Notepad again with the same method and type the following in it: diskpart /s rescan.txt 5. Save the file as 1.bat (refer to step 4) on your Desktop. Note: rescan.txt and 1.bat should be under the same directory. 6. Refer to the Desktop and right click the "1.bat" file, then choose "Run as administrator". 7. You will see a DOS-like window processing. (Please wait while Diskpart scans your configuration...). Good luck!
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2009 11:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics