Windows Command Line- Assign High Priority to FIND

2019-09-09 02:37发布

Does anybody know how to manipulate this code so that the FINDSTR process always is assigned high priority?

FORFILES /P C:\path /M * /C "cmd /c FINDSTR /c:"@FILE"   C:\path\*">C:\path\repgenresults.txt

I tried assigning priority manually in Task Manager, but I would need to do that a couple thousand times, because each new process with a new iteration of the loop is assigned normal priority. I also tried combining the cmd and start functions without much luck. Any ideas?

1条回答
孤傲高冷的网名
2楼-- · 2019-09-09 03:35

You could put everything inside a batch file then use the command START to execute the batch file with the priority choosen

See START references

Example

START "RunAsHighPriority" /HIGH /WAIT YourCommand.cmd 
查看更多
登录 后发表回答