Commonly to save a result into a file in batch, the cmd needs >
Example:
dir c:\windows\system32 > file.txt
but if i want to append a second command to file.txt how it should be done?
Example:
dir c:\windows\system32 > file.txt
dir c:\windows > file.txt
Append two commands in a file
Moderator: DosItHelp
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Append two commands in a file
You can use dir c:\windows>>file.txt to add text to the end of a text file instead of overwriting it.