Save batch file output to text file

Clanger

Moderator
Staff member
I want to save the outputs of Get-Features and Get-Capabilities bat/cmd files to Administrator/Desktop, what do i need to add to this line to get that?
Code:
Dism /online /Get-Features
 
Run from desktop and its saved to desktop. Or change output.txt's path, 2 ways u may try;

@echo off
>output.txt (
Dism /online /Get-Features
)



or



@echo off
call :Commands >output.txt
exit /b

:Commands
Dism /online /Get-Features
 
Last edited:
Back
Top