Command prompt output to Excel file in arranged format
Olivia Zamora
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