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?
Naming a file based on its contents.
Collapse
X
-
Tags: None
-
You would want to read the file line by line, then split on the delimiter '|' and use the 4th element for the first part of the name. Then save the file to the location of your choice. I am not sure where you are getting 021220081430 from. Can you provide some better sample data as well as what you have tired, so that we may help you?
--Kevin
Comment