I need to read in a file, and, on the outbound side, name it based on the contents of the file. For instance, if there is text in the file that looks like this: OBX|1|TX|NN^ I want to name the file NN_021220081430 . If the text looks like this: OBX|1|TX|CON^ I want to name the file CON_02122008143 0. Can someone help me out?