Solved stop DOS truncating output

July 3, 2016 at 06:20:22
Specs: Windows 7

I want to stop DOS truncating output.

In this case I am using the "driverquery" command to list all the drivers

The column "Display name" has been shortened in the output to about 22 characters

id like to run the driverquery comand but show the full output for all its columns

I searched but cant find how to do this

Thanks for reading

See More: stop DOS truncating output

Reply ↓  Report •

July 3, 2016 at 08:26:01
driverquery /fo csv

should do

and... it ain't DOS


M2 Get custom script or take private lessons

Reply ↓  Report •

July 3, 2016 at 14:14:49
I have tweaked the cmd.exe window size & buffer to comfortably fit the text into

I have tried every combination from the driverquery /? command

I see that the csv export does have the column headers with full info displayed however I require this in a text file

The export to text file has the columns squashed and it would not be inhibited by windows size etc.

The console output has the display njame column shortened also.

I need the output in a text file, the text file is for gathering diagnostic info from a machine

e.g. driverquery >> bleh.txt

Any way to tell cmd.exe not to do this in the output ?

The "display name" column is too short


Reply ↓  Report •

July 3, 2016 at 21:44:45
✔ Best Answer
As M2 pointed out, the full data is available using the /fo csv option. Also available using the /fo list alternative. The data is not "squashed" in the csv - it's all there for you to extract. F/e, using the csv format, to extract only this element:
@for /f "tokens=2 delims=," %%a in ('driverquery /fo csv /nh') do @echo %%~a > drivers.txt
For more help, you need to lay out your textfile format. So far you only want thie full description. The format needs to specify the fields, and whether they are to be fixed-length or delimited. But that's all just details.

message edited by nbrane

Reply ↓  Report •

Related Solutions

Ask Question