Windows batch way to replace all files in subdirectories with singular file (copy, rename all files) <p>I have a good command over <code>cmd</code> commands, but this may require a variable or a loop which is where I fail in batch commands. Please help if you can!</p> <p>-- Have about 100 subdirectories each has 1-20 HTML files in it. There are about 100 HTML files in the root directory too. -- Need to replace all HTML files in the above directories with the same HTML source (copy over existing file and keep the name the same). Basically trying to replace all existing files with a redirect script to a new server for direct bookmarked people. We are running a plain webserver without access to server-side redirects so trying to do this just by renaming the files (locked down corp environment).</p> <p>Seems pretty simple. I can't get it to work with wildcards by copying the same file over to replace. I only get the first file replaced, but the rest of the files will fail. Any one with any advice?</p>