A brief note about programming languages.
If the OP has a hard time with batch files, he might consider looking into an approach that makes things easier. There are a number of tools that have been created to make it easy to perform some kinds of update and maintain things res on a PC.
Here are just a few better programming tools to save time and reduce unwanted errors. They all begin with the Letter P.
P#
Pearl
PHP
Pizza
PL/M
PostScript
Powershell
Prolog
Python
All the above have features that could make programming easier if you get stuck with a batch file problem. Some experts say you can not mix one language with another. I disagree, that is what I used to do years ago and I believe that kind of approach is still a good idea. Some experts do not like it because it is not "Pure". Well, there is a language called "Pure" and it is tolerant.
[Pure is a small language designed from scratch; its interpreter is not large, and the library modules are written in Pure.]
But even "Pure" will let you invoke other stuff if need be. The pint I wish to make is the OP might consider looking around and trying to add to his skills.
I will stop here. Just saying that the OP ought to do wider study of programming. Looking at another language might help.