| I am attempting to obtain information from a text file using the FOR /F command from a batch file.|
The text file will have one line for example:
Report\network\testing_WINSOCK.TXT:Provider Path: c:\Program Files (x86)\Microsoft Firewall Client 2004\FwcWsp.dll
My goal is to obtain the dll file in a variable. I have been attempting to use the FOR command, but I am unable to determine what DELIMS I should be using. On the left, there will always be the path for testing_WINSOCK.TXT file, then Provider Path, then the path to the file I need to obtain.
I would like to use the backslash as the DELIMS, but I don’t know what the TOKEN will be. Is there a way to find the last token?
This is what I have so far.
FOR /F “TOKENS=* DELIMS=\” %%G IN (‘more testing_WINSOCK.TXT’) DO (Var=~nxG)
Any help is appreciated.