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.
Code: Select all
(FOR /F "Tokens=1,2,* Delims=:=" %%a IN ('FINDSTR /s /i /b /c:"URL=" "*.url"') DO (
ECHO.^• ^<a href="%%c"^>%%~na^</a^> ^<br^>
I would add the "last level name folder" before each link.
How to catch the last level name folder in the FOR loop?