Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-19-2010, 01:07 AM #1
- Join Date
- May 2010
- Thanked 0 Times in 0 Posts
Batch/Script Program that Creates Files
Hello everyone! I was on a website looking up a couple things and I decided I could use some help real quick. My mom asked me if she would make me a program to keep records of hours and stuff. But, I am making it in a batch (or as I was informed, a "script" file) file. I have the coding and everything like cd and md, but I don't know how to make a batch program actually create a text document. Anyone help?
Or, if there is another programming language that will create text documents please specify it in your comment.
Last edited by Lunar; 05-19-2010 at 01:10 AM.
05-19-2010, 05:09 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 Posts
I'm not sure I'd really consider this an Other server side language / issue thing. Moving to Computer Programming.
Creating text files can be done in a few ways depending on what you are doing. A simple redirection to a text file with
echo "Text here" >> somefile.txtwould work, that should append to somefile.txt and create if it doesn't exist. Use > if you just want to overwrite.
I'm not sure batch is really the tool for this job though. Programming wise, this seems like its most easily done in something like C# or Java (yes, both can create text files ). Application wise, this can be done up quite nicely with excel or similar spreadsheet program.
Both of the above, and other languages like C/C++, Perl, Python and many many others, can do a command line interfaced version for what you are looking to do. GUI wise, C# and Java are the easiest, where I'll put emphasis on Java for portability, and C# for ease of gui creation. If you have Visual Studio, look at using C# or VB.NET to write this in. If not, use Java since its free.
Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');