Hi guys,
I want to write a batch file to add text into a text file.
I do not have the slightest idea on how to start with a batch file. This is not homework, this is a little side project I am doing.
I know the patch to the text file, and I know the lines that I need to add to it. I want to use this program, to add these lines to all our work PC's.
Thanks!!
Batch file help
-
- Registered User
- Posts: 8346
- Joined: 10 May 2006, 02:00
- Processor: Intel i5-3750
- Motherboard: Gigabyte
- Graphics card: nVidia GTX 550Ti
- Memory: 8GB Jetram
- Contact:
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
Re: Batch file help
Code: Select all
echo my test sentence > target.txt //will create a new file with echo's contents
echo my test sentence >> target.txt //will append a new line with echo's contents
Most people would sooner die than think; in fact, they do so - Bertrand Russel
Re: Batch file help
Open Notepad.I do not have the slightest idea on how to start with a batch file.
Then paste what Rustypup posted.
Code: Select all
echo my test sentence > target.txt //will create a new file with echo's contents
echo my test sentence >> target.txt //will append a new line with echo's contents
-
- Registered User
- Posts: 8346
- Joined: 10 May 2006, 02:00
- Processor: Intel i5-3750
- Motherboard: Gigabyte
- Graphics card: nVidia GTX 550Ti
- Memory: 8GB Jetram
- Contact:
Re: Batch file help
Thanks, fixed it!