Reputation: 129
The output of the below code only takes the first word of each line. I want to see if the disk DYN or not.
@echo off
diskpart /s test9.txt
for /f %%i in ('diskpart /s test9.txt') do echo %%i
Code Outputs: Disk
[Dashed Lines]
Disk
How do I get the whole line?
Upvotes: 0
Views: 517
Reputation: 37589
"tokens=*"
removes leading spaces,this is not the issue here but for general reasons use better:
for /f "delims=" %%i in ('diskpart /s test9.txt') do echo %%i
Upvotes: 3
Reputation: 4750
for /f "tokens=*" %%i in ('diskpart /s test9.txt') do echo %%i
Upvotes: 0