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.
wc tool
About this tag
The wc tool is a command-line utility used in Windows batch scripting to count words, lines, and characters in text files. Discussions on WindowsForum.com focus on integrating wc output into variables for use in scripts, such as displaying results via the MSG command. Users encounter challenges with command syntax, particularly when piping wc output to SET /P or the clipboard. Troubleshooting covers Windows 10 environments and batch file execution, with emphasis on correct command formatting and file path handling. The tag reflects practical scripting solutions for text file analysis in Windows.
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
command output
error resolution
file path
line count
message command
output
path correction
script help
scripting
set command
syntax error
text count
variables
wctool
windows 10
word count