New
#1
Unable to correctly parse lines in a .txt file through batch
Good Afternoon All,
This is my first post so if I inadvertently insult anyone through my mannerism I apologize in advance.
So the puzzle is that my company creates programs for our clients and would like me to create a batch file that can be placed on the desktop and auto-copy all of the files to the new destination overwriting the old ones.
This is no problem for me, the problem I have is that they are all in different areas, so I wrote some code to extract the information from the Registry key and write it to a .txt file.
I now need to parse to the last name and just be able to copy out the directories name and give it a value I can then use in the rest of my code.
Thanks so much for any help in advance.
P.S: This is what I see from the registry file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\xxxxxxx\xxxxxxxx]
"DATABASEINSTANCE"="xxx\\xxxxxxxxx"
"AUTHENTICATIONTYPE"="0"
"USERNAME"=""
"PASSWORD"=""
"TARGETDIR"="D:\\Program Files\\xxxxxx\\xxxxxxx\\"
I just need this part as a variable to be able to finish off the code D:\\Program Files\\xxxxxx\\xxxxxxx\\
and boy am i struggling :)