I'm trying to solve a fairly simple task using a batch script, and in a nutshell it's driving me...well, nuts!
I have a backup directory (e.g. C:\tmp1\) that contains what looks like the root of drive C, so C:\tmp1\Windows\ for example. I want to copy all of the contents of tmp1 to another location, but here is the catch: I have a text file that contains files that need to be deleted before the copy takes place. So for example:
# This is a comment
The line beginning with ! would need to be translated into C:\tmp1\Windows\System32\foo.dll and then deleted. There are many exclude lines and comments in the text file. Another concern is that I would need to run takeown / icacls in order to guarantee deletion.
I could knock this out in Bash script no problem, but Batch script....uhhh...help?