Computing.Net > Forums > Programming > generate a new txt file from batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

generate a new txt file from batch

Reply to Message Icon

Name: Code One
Date: January 14, 2004 at 16:37:48 Pacific
OS: me
CPU/Ram: blah
Comment:

is it possible to generate a new txt doc. from a batch file, and name it and send it to a certain location all from within the bat file.

kinda like making a new directory but this time making a new file type (txt)

thank you

co



Sponsored Link
Ads by Google

Response Number 1
Name: Dr. Nick
Date: January 14, 2004 at 22:09:06 Pacific
Reply:

Well, my guess is that you're not doing anything this simple (based on how much you've been posting about batch files :), but you can create one just by redirecting output from the console to a file like this:

ECHO HELLO WORLD > FILENAME.TXT

That will print 'HELLO WORLD' to the file FILENAME.TXT. If the file doesn't exist it will be created, and if it does exist it will be erased.


0

Response Number 2
Name: Code One
Date: January 14, 2004 at 23:06:00 Pacific
Reply:

why din't i think of that...lol

i did it the long way ... please don't ask how... even takes a long time to explain..Im tired...lol

thanks

code one


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: generate a new txt file from batch

Monitor folder for .txt file, www.computing.net/answers/programming/monitor-folder-for-txt-file-/15250.html

how to creat a NEW .dat file in C? www.computing.net/answers/programming/how-to-creat-a-new-dat-file-in-c/4558.html

help with Batch file to change .txt www.computing.net/answers/programming/help-with-batch-file-to-change-txt/14693.html