I have read all the same questions and tried to use it to create a batch script, but failed .
I have hundreds of txt files that all start like this: (without space between lines)
SGCO master calibration input data ,,,,, ,,,,,,,,,,,,,, 09-Sep-2014 ,, England, Tom, ,,,,,, serial number, 20165 9, dwt number, 2177 cal dated 04.10.2013 ,, ,,,,, gauge pressure range, 10K, Dwt. Factors of improvement, 1.00128 ,,,,,,,, number of temperature, 5, ,,,,,,,,,,,, number of pressures, 11, ,,,,,,,,,,, calibration temperature unit , DEGC, calibration pressure unit, psig, ,,,,,,,,,,
(not always of small quantities) I 10-of
(After the range) 201659
(after serial number) 09-Sep-2014
You want to use the following code: (after date),
SG10K - 201659 - 09-Sep-2014.txt
" Resettlement enabled extension for: %% f (* .txt) (REM Receive the desired lines and set the variable:
Set / f "tokens = 1,2 delims =", "%% i in ('findstr' ^ dated ^ serial range, '%% f') %% i = %% jm REM creation filename: set" name =! Gauge Pressure Range: = SG! -!! Serial number! -! Date! .txt "echo file name is:"! Name! ")
No comments:
Post a Comment