how to edit text files in cmd
3. Open cmd prompt >> type the following command: c:\xyz.bat âtext-to-replaceâ text-to-replace-with c:\FileToEdit.txt > c:\Edited_file.txt. xyz.bat is the batch script we have created in Step 1; FileToEdit.txt is the file you would like to edit; and Edited_File.txt is an edited file. The command will edit the file (FileToEdit.txt) and output into a new file (Edited_File.txt). File to edit. Output - Edited file. This script can also edit an htlml file.