Command prompt output to Excel file in arranged format

We can display command prompt in .CSV file using > and >> but how to arrange these output in .CSV file.

Eg: When we run multiple commands each output should be stored in different columns.

1 Answer

You need to separate your results with commas. One way is to assign your results to variables then redirect them to the CSV file all at once.

set c1="command one"
set c2="command two"
echo %c1%,%c2% > myFile.csv
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like