Simple stuffs eat up your time….

Sometimes, you get stuck up at things which seems to be really simple. I had to copy htaccess file to all the subfolders on a windows server. Windows doesn’t allow this with its default setup. This is when i digged my batch script to do this task:

————
@echo off & setLocal EnableDelayedExpansion

for /f “tokens=* delims= ” %%a in (folderlist.txt) do (
copy d:\path\to_file_that_has_to_be_copied_over\soj.htaccess %%a
)
—————

folderlist.txt should have all the folder names where the file soj.htaccess should be copied over.

Advertisements