School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,421 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,525 people online right now. Registration is fast and FREE... Join Now!




Batch file help

 

Batch file help, Text document editing

paperclipmuffin

6 Jun, 2009 - 11:29 PM
Post #1

WinWinWinWindows?
Group Icon

Joined: 16 Apr, 2009
Posts: 885



Thanked: 9 times
Dream Kudos: 400
My Contributions
Hi all,

I'm trying to create a batch file that will open a text file like so:
CODE

START NOTEPAD %file.TXT

(which I know how to do) and then add text to it automatically without the user having to do a thing.

Help anyone? ph34r.gif

User is online!Profile CardPM
+Quote Post


noorahmad

RE: Batch File Help

6 Jun, 2009 - 11:58 PM
Post #2

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
are you running you a file?

your code is correct check your file.txt i think it is not exists next to your batch file.
User is online!Profile CardPM
+Quote Post

paperclipmuffin

RE: Batch File Help

7 Jun, 2009 - 02:03 AM
Post #3

WinWinWinWindows?
Group Icon

Joined: 16 Apr, 2009
Posts: 885



Thanked: 9 times
Dream Kudos: 400
My Contributions
Opening the file works fine, I want to somehow add text to the file using the batch.
User is online!Profile CardPM
+Quote Post

Raynes

RE: Batch File Help

7 Jun, 2009 - 03:21 AM
Post #4

Resident Witch. No, really.
Group Icon

Joined: 5 Jan, 2009
Posts: 900



Thanked: 11 times
Dream Kudos: 225
My Contributions
CODE

echo Your text here >> textfile.txt


Should work.
User is online!Profile CardPM
+Quote Post

paperclipmuffin

RE: Batch File Help

7 Jun, 2009 - 10:22 PM
Post #5

WinWinWinWindows?
Group Icon

Joined: 16 Apr, 2009
Posts: 885



Thanked: 9 times
Dream Kudos: 400
My Contributions
Thanks! Works like a charm! biggrin.gif
User is online!Profile CardPM
+Quote Post

Raynes

RE: Batch File Help

8 Jun, 2009 - 05:10 AM
Post #6

Resident Witch. No, really.
Group Icon

Joined: 5 Jan, 2009
Posts: 900



Thanked: 11 times
Dream Kudos: 225
My Contributions
No problem. smile.gif
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 12:10AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month