Last level folder= folder that have no sub folder.
Here is the script putting links of .URL files (web page shortcut)
in a links.html file,
from the current folder and sub folders.
Url2Htm.bat
Code: Select all
@ECHO OFF
SET z=%~PD0Links.hTM
TYPE NUL>"%z%"
(FOR /F "Tokens=1,2,* Delims=:=" %%a IN ('FINDSTR /s /i /b /c:"URL=" "*.url"') DO (
ECHO.^• ^<a href="%%c"^>%%~na^</a^> ^<br^>
))>Links.html
Pause
I would add the "last level name folder" before each link.
How to catch the last level name folder in the FOR loop?
Thanks.