I'm trying to write a script that will go through a director structure like:
school/admission/english->index.html
It should rename index.html to english.html which is it's parent folder and move it a level up so that the result would be like
school/admission/english.html
This same process should get repeated for all the files by the name index.html
in that folder structure. Any help about how to approach this problem would be appreciated.
To find all the index.html files I have:
@echo off
for /r %%i in (index.html) do echo %%~ti %%~zi %%i
To move .html files one level up:
for /r %x in (*.html) do move "%x" "%x"/../..