Sometimes you need to create a text file or you need someone else to. This is usually easy, but what if it needs to be a batch file and they have file extensions hidden?
Here's an easy way to make sure the correct extension is created with the file.
Go to Start and hit Run. Type:
From the command prompt, type: echo yourtexthereaswhateveryouwant > filename.fileextension
Here's how to create a file that will run the defragmentation engine in Windows as a batch file:
echo defrag c: > defragc.bat
The system will create the file in whatever folder the command line is operating in. In this case, that's my desktop. Note that there's no confirmation message.