xcopy (var1)\(var2)\cache\*.* C:\backupdata\(var1)(+var2)
next to end
where var1 = list of names (20 or so)<Loop A>
var2 = list of their clients (up to 20)<LOOP B>
Tis is to create an exact copy of the files inside Only the cache folder stored in the backup above. My problem is I always get lost in the "Loop-d-loop Logic" options. (For x in ?= etc.)
The folders exists in the past as stated each (name) may have from 0 to 20 (client) folders and each client folder has a (cache) folder.
I need to copy the complete contents of that folder to another one at C:\backupdata\"(name)+(client)"\cache\*.*
If the file already exists in that folder it should overwrite but none ever deleted. After copying every subfolder and file in that "cache", it should shift to inputting the next client until it has run through all of them for that (name). These names are all subfolder names in the root folder the batch starts in (or it can be one level down)
Root\names\clients\cache The structure is just like that. Some (name)s may not have any (client)s but all (client)s have cache folders
The only reason for doing it this way is to avoid keeping backups of all the Other folders and files that are inside each client that are all standard. I'm still trying to get inside the 2nd loop.
Any pointers. I know it is probably something simple. I tried pulling the variable from a list but it would be better if they could be pulled from the run itself since they are all names in a directory listing anyway.
The current process works fine but wastes a ton of time and space making redundant copies of unneeded files.