batch file to read a 2nd field in flatfile (dos)
Posted: 19 Jun 2012 17:29
I have a log file \from\where\some\directory\log.txt
How do we write dos batch file to get the hostname of the old start time (automatically in 2nd lines) like
sabercatswin7
and then run execute script C:\script\removeit.exe -release=SABERCATSWIN7
I want the batch file to run in scheduler to remove the old hostname.
Thanks,
Code: Select all
54,SABERCATSWIN7x64,sabercats-pc,,,2012-06-19 15:36:42.000,,,,,,,
3,SABERCATSWIN7,sabercats-pc,,,2012-06-18 15:44:53.000,,,,,,,,
How do we write dos batch file to get the hostname of the old start time (automatically in 2nd lines) like
sabercatswin7
and then run execute script C:\script\removeit.exe -release=SABERCATSWIN7
I want the batch file to run in scheduler to remove the old hostname.
Thanks,