well, that isn't the full program, that is just the part I'm having problems with. I don't get why the freak ifstream openFile (); has to be manually assigned with the filename instead of using a variable.
and it's not opening the file that is the problem. I've got the program completely working as it is. The only problem is I want it to be able to open a file BATCH001.DAT or BATCH002.DAT and as it is if BATCH002.DAT doesn't exist it won't do anything. Seems kinda stupid to have two different .exes to open the right file name.
Also, the output file is the same thing. You have to put "FILENAME.EXT" instead of a variable that would let you make up the filename when you run the program.