I've a controlfile.txt file in which I have some softwares names in each line, e.g. "Microsoft Office" in first line, then "Autodesk AutoCAD" in second line, "Adobe Acrobat Reader" in third line and so on. I need a batch script to fetch each line from that .txt file as a string (more than one word in a line) and google search each string (Software Name) in a separate tab for its license terms or EULA. I've this the following code, but it is not passing the value of array as a query for google search.
@echo off set "file=C:\New folder\controlfile.txt" set /A i=0 for /F "usebackq delims=" %%a in ("%file%") do ( set /A i+=1 call set array[%%i%%]=%%a call set n=%%i%% ) for /L %%i in (1,1,%n%) do ( call echo %%array[%%i]%% start "" chrome.exe www.google.com#q=%%array[%%i]%%+EULA )