1

I know how to check if a specific program is running like winrar which might indicate usage on drive d: but is there a better way to determine if a drive is relatively idle enough (via Batch or other method, invoked from a Batch file) to start moving a large file (in a Batch file operating in the background), since simultaneous move operations seem to cripple my computer, probably due to the 100% HDD usage, I'm guessing. Defragmented drive but still.

Bricktop
  • 331

1 Answers1

4

One simple way could be done in a single line and the best part is that you don't need to time it. Let the system worry about that.

We want the use the Start command with the /LOW priority flag. If you type start /? you can see that the /LOW flag actually means IDLE.

Note that disk I/O is your real issue (and not processor load per say) but this should still make a big difference.

Something like:

start /Low "Copying files on idle..." cmd.exe /c copy "c:\gigantic_nerd.file" "d:\archive_folder"
  • we see start setting the process priority to idle
  • we see start setting the title to "Copying files.."
  • then start starts cmd.exe with the /c flag which tells cmd.exe to exit when it is done.
  • everything after "copy blah blah blah" is executed by cmd.exe which is now running at Idle priority.

Keep in mind that you can also use start to limit which processors are allowed to be used as well.

Please note: This is a good exercise but for most people a $29 256gb SSD drive would make this all go away. EVEN A $14 128GB SSD drive would change your life. This is not possible if replacing a huge drive.

Also note: OP has a friggan monster of a HDD (24TB) and it ain't getting replaced by an SSD a time soon.

Giacomo1968
  • 58,727