0

The batch snippet is:

for /f %%i in ('driverquery /si ^| findstr /C:"QD1000_RS232_DRIVER"') do set USB_DRIVER_FOUND=%%i

So what does the ^ mean?

I tried to run part of the command:

driverquery /si ^| findstr /C:"QD1000_RS232_DRIVER"

But failed:

ERROR: Invalid argument/option - '|'.
Type "DRIVERQUERY /?" for usage.

ADD 1:

The explanation of ^: (search for ^)

http://ss64.com/nt/syntax-esc.html

smwikipedia
  • 61,609
  • 92
  • 309
  • 482

1 Answers1

2

It's the escape character. It escapes the pipe so you can put it in the string quotes ' ' without the shell trying to use it as a pipe. To run it directly would be

driverquery /si | findstr /C:"QD1000_RS232_DRIVER"
TessellatingHeckler
  • 27,511
  • 4
  • 48
  • 87