Displaying Windows command prompt output and redirecting it to a file

To expand on davor’s answer, you can use PowerShell like this:

powershell "dir | tee test.txt"

If you’re trying to redirect the output of an exe in the current directory, you need to use .\ on the filename, eg:

powershell ".\something.exe | tee test.txt"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)