You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
command output
About this tag
The command output tag covers discussions about capturing and processing the output of commands in Windows, particularly in batch scripting and CMD.EXE. Common topics include using syntax like SET /P to store command output into variables, piping output to clipboard tools like clip, and integrating command results into messages or other commands. Users often seek help with formatting, error handling, and making output usable in scripts. The tag is relevant for Windows 10 and later versions, focusing on practical troubleshooting for command-line automation tasks.
Hi!
I tried to send command output to variable.
I'm using is in Windows 10.1903 x64
I used syntax:
SET /P variable= | command
I used batch by context menu to get word, characters and lines count in text file using old WC tool (it's great).
First I used only copying output into clipboard by...
batch file
character count
clipboard
cmd
commandoutput
error resolution
file path
line count
message commandoutput
path correction
script help
scripting
set command
syntax error
text count
variables
wc tool
windows 10
word count