print output of two commands in two columns in excel file

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
melinadavid
Posts: 1
Joined: 06 Jun 2017, 01:26

print output of two commands in two columns in excel file

Post by melinadavid »

Hi,
I am writing a windows script to run 2 commands. Now the outputs goes in two rows, but I want the output of each command goes in different columns in excel. This is My script:

Code: Select all

For %%F in (*.txt) do ( 
Command_1 %%F >> output.xls & command_2 %%F >> output.xls
)
Now my Output.xls is like:

Code: Select all

AAA
BBB
I want my output.xls be like :

Code: Select all

AAA BBB      

I will appreciate if somebody has any solution for this.

Thanks,
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: print output of two commands in two columns in excel file

Post by rednoah »

What you're trying to do is not possible with standard IO redirection. Moreover, use bash via WSL or PowerShell. You're doing yourself a disfavour by using CMD in this day and age.
:idea: Please read the FAQ and How to Request Help.
Post Reply