|Hi, first time posting but long time follower... |
Batch experience: noob..
Here is what I need to do:
I need to created 160 individual files titled %name%.txt based off the entries in another .txt file. But contents of of each txt file needs to have parts changed depending on another file.. These are going to be 160 .vnc connection settings based off an IP listing in a text file.
So, here is what I have..
YardCPlist.txt = this is my list of IP's on our local network.(example: 10.2.1.39)
VNC.txt = this is a *.vnc connection renamed to *.txt, this carries the information needed for connection. The one line that needs to change per IP is "host=10.2.1.39" (no quotes)
So, here is my cod i have now..
@for /f %%a in (YardCPlist.txt) do call :work %%a
This will create individual *.vnc connections based off my YardCPlist.txt file (10.2.1.39.vnc), though it will only put in 'mytext' in the file.. which i planned as a test to see how to create multiple files based off a list. but no i need to take the contents of VNC.txt and create connections based off YardCPlist.txt.
I need to make a variable somehow so it creates a file named from YardCPlist.txt, adds the entry i need in the text from VNC.txt
Now I have tried to just copy and past my whole VNC connection text into the batch but it fails to create files. something like this..
Thanks for reading any advice..