1

I was trying to delete com port using command line. Right now I am using devcon.exe that is a part of windows WDK. I have tried using devcon findall =ports and used devcon remove "@some specific id". It worked totally well.

Instead of removing them one by one, I wanna write a for loop to remove all of them. I tried this in a batch file:

for /f %%i in ('devcon findall %*1*') do (devcon remove "@%%i")

It runs but does not have any effect. Anyone knows how to fix it?

GrandMasterFlush
  • 6,269
  • 19
  • 81
  • 104
Mr_U4913
  • 1,294
  • 8
  • 12

0 Answers0