05-19-2010, 12:07 AM
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.
05-19-2010, 04:09 PM
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.txt would 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.