|Hi tvc, thanks for your reply.|
I'm not trying to build a cmd file. The way I plan to use the text file is to just extract the characters to the left of the equals sign.
For exampe, the end result in the text file would look like this:
Everything to the right of and including the = sign are just comments to allow easy identification of what the values on the left are for.
The rules I set up for my batch file are:
1st character = drive letter.
2nd character = type of drive. (0=rd-only, 1=CD-burner, 2=DVD-burner)
So M2 means Drive1's letter is M and it is a DVD burner drive.
I'm putting the values as the first characters on the line for easier extraction using something like:
which should set Drive1 equal to M2 and ignore the rest of the comments on that line. This of course is after I "Find" the line and assign the entire line to a variable named "Value".
In my actual code I planned not to have spaces in the command as:
I apologize for putting the spaces in my original post.
I was just wondering if there is a way to write all of that data in one write operation or is the only way to do it is to write line-1 and then append additional lines one-by-one in many write operations to the .txt file.
Thanks much for your help!