I'd like the code for an MS-DOS batch file which takes in the first 8 characters from the file "data.dat" and then writes a new file "output.dat" containing just those first 8 characters.
For Example:
If "data.dat" contains the text:
hello_are_you_ok
the batch file should write the following into "output.dat":
hello_ar
Could answerers please leave the code in their answers (please stick to DOS commands as their is a reason for this, please do not ask me to write it in another language).
2006-09-22
14:33:14
·
5 answers
·
asked by
Rich
5
in
Computers & Internet
➔ Programming & Design
"DOS commands are not powerful enough" says someone (I cannot be bothered with their name) - what about a simple TYPE command with something else thrown in there to only allow it to type the first 8 characters?
2006-09-22
15:36:12 ·
update #1
I CAN read the first file, but I am not going to site and retype 8 characters myself - there are many files I have to do this with. I know that you would use '>' to get it into another file, my problem is the 8 characters bit. And I also said NO OTHER LANGUAGES. Is that really that diffucult to understand?
2006-09-23
02:14:39 ·
update #2