You are not logged in.
Heya,
I need some help here. I am trying to automate a scan of standalone hosts. What I have is a .csv file containing the IP-address, username and password for every host.
What i want to do is creating a batchfile for every single IP-address. Were the data from the .csv file is placed
rvtools.exe -s <ip-address> -u username -p <password> -c ExportAll2csv -d
in that string instead of the <ip-address>, <username> and <password>.
Best regards
R
Offline
I'm not entirely sure what you are trying to do, but you may find the quickest /easiest method is to open the CSV in Excel and then add a column with a string expression that makes the command you want to run.
Then copy that column into a batch file and run it.
The alternative is to write a FOR /F command that parses the CSV file, extracts the 3 tokens and writes the command.
Offline
The alternative is to write a FOR /F command that parses the CSV file, extracts the 3 tokens and writes the command.
Yes, and here's a framework:
@echo off
for /f "usebackq tokens=1,2,* delims=," %%a in ("file.csv") do (
rvtools.exe -s %%a -u %%b -p %%c -c ExportAll2csv -d
)
pause
Note that usernames with commas inside it will break this.
Offline
Thanks for the help It worked
Offline