|
Answer» Hi Folks,
From the following logfile I am trying to extract "NetWorker savegroup: (notice) index completed" to a variable - I have tried lots of variations using find & findstr but have had no success. Can anybody point me in the right direction to achieve this.
Mar 27 14:36:18 moses: NetWorker savegroup: (notice) index completed, Total 1 client(s), 1 Succeeded. Please see group completion DETAILS for more information. Mar 27 14:36:18 moses: Succeeded: moses Mar 27 14:36:18 moses: saveset moses:C:\DELL: percentage of inactive files by count: 50.00, by space: 39.61 Mar 27 14:36:18 moses: Start TIME: Fri Mar 27 14:35:51 2009 Mar 27 14:36:18 moses: End time: Fri Mar 27 14:36:18 2009 Mar 27 14:36:18 moses: --- Successful Save SETS --- Mar 27 14:36:18 moses: * moses:Probe savefs moses: succeeded. Mar 27 14:36:18 moses: moses: C:\DELL level=full, 401 KB 00:00:04 16 files
Many Thanks, Matt. you COULD try this script: Code: [Select]@echo off for /f "tokens=*" %%a in ('findstr "NetWorker savegroup: (notice) index completed" logfile.txt') do set returnstring=%%a echo %returnstring% pause
Hope this Helps ,Nick(macdad-)
|