FOR /F with usebackq usage
Posted: 16 Jul 2021 02:24
Hello!
If I understand correctly, these 2 code samples output the exact same result.
I've been examining different scripts and found that almost always usebackq is used with operations where for /f is working with the output of a command. Are there some disadvantages related to the usage of single quotes, or some subtle side effects?
Thanks!
Code: Select all
for /f "tokens=*" %%a in ('dir /b') do @echo %%a
Code: Select all
for /f "usebackq tokens=*" %%a in (`dir /b`) do @echo %%a
I've been examining different scripts and found that almost always usebackq is used with operations where for /f is working with the output of a command. Are there some disadvantages related to the usage of single quotes, or some subtle side effects?
Thanks!