Batch Script Creating Files
Creating Files
In Batch Script, the creation of a new file is done with the help of the redirection filter >. This filter can be used to redirect any output to a file.
note
Learn more about redirection in our Redirection Operators Chapter
Example
@echo off
echo "Hello">C:\new-file.txt
If the file new-file.txt is not present in C:\, it will be created with the previous command.