|Doesn't look that difficult ... but, how do you separate ? I mean, the above would result in the 1 line you need to name a file, but how does it go on ?|
The file is generated by an FTP server sent text file from a touchscreen. I did a copy and paste of the file. The fields are seperated by spaces. The date/time stamp from the text file is automatically generated at the time the event started. I am logging (in this case) 4 date/time stamped work order runs when they first begin. I know that I need to skip the first line "Date Message", find the 1st occurance of the word that is immediately after the first "work order", look and see if there are more work orders and capture those characters as well. 4 would be the maximum number of work orders that the system could generate. At the end of the machine cycle, a trend file is geneated that I will be tying this new file name header onto. This way the operator can look for a particular work order (up to 4), or a time / date, that has been saved in a folder. The application is a batch baking oven that runs heating ramp/soak profiles and the system generates a .txt file of the temperature/time/setpoint results. I am using Office Outlook to run a rule (start .exe file) when the system emails a profile complete message. I am converting the .bat file to .exe since Outlook doesn't run a .bat file.
Like this :
06:00:56 03-26-2010 work order 123456
06:00:57 03-26-2010 work order 12345
06:00:58 03-26-2010 work order 1234
06:00:59 03-26-2010 work order 123
Or does each set of max. 4 work orders, resides in max. 1 file only ?
How do you come to 06:15 ? I see only 06:00 ?!
I want the date/time stamp to occur when the batch file runs at the end of the oven cycle. The 6:00 time stamp was just when the system actually generated a start time. I am looking to use the current date/time stamp to add to the file name for archiving purposes.
Thank you very much for such a prompt reply. I do a lot of PLC programming, and a "very little" bit of simple .bat type stuff. I have had portions of code to work but I'm sure there are much better ways that I can do.