Quantcast

Maximum PC

It is currently Tue Sep 30, 2014 2:01 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Append txt's in DOS
PostPosted: Fri Jul 03, 2009 4:52 am 
Million Club - 2 Plus
Million Club - 2 Plus
User avatar

Joined: Sat Jun 07, 2008 9:29 am
Posts: 1105
I make batch files to do loads of the things i really dont wanna do when im at work and home, for example, i have a batch file that i use to map my network drives at home, and a startup batch fiule that starts all of my programs 'cause windows dosn't seem to do it anymore on its own.

I have a question, can batch files append text to an already existing text document? For example, i have a txt called "List.txt" and a batch file that make lists of specific folders, for example, here it is right now.

Code:
@Echo off
cls
tree /a "K:\active" > "C:\list1.txt"
tree /a "K:\inactive" > "C:\list2.txt"
tree /a "M:\video" > "C:\list3.txt"
tree /a "L:\users" > "C:\list4.txt"


is is possible to make all of these just append to the end of one txt file?

Thanks! let me know if im not clear somewhere, i failed high school english for a reason! haha


Top
  Profile  
 
 Post subject: Re: Append txt's in DOS
PostPosted: Fri Jul 03, 2009 10:34 am 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4745
Location: In the monkey's litterbox
Use >> instead of > to append to a file.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 2:51 pm 
Million Club - 2 Plus
Million Club - 2 Plus
User avatar

Joined: Sat Jun 07, 2008 9:29 am
Posts: 1105
its that easy, eh? kickass, thanks!


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.