Kod: Tümünü seç
@echo off
setlocal enabledelayedexpansion
rem Check if a file is dragged onto the batch file
if "%~1"=="" (
echo Drag a bookmarks.html file onto this batch file.
pause
exit /b
)
set "bookmarksPath=%~1"
set "outputTxtPath=%~dpn1_urls.txt"
rem Extract URLs
(for /f "tokens=2 delims==" %%a in ('findstr /C:"<A HREF" %bookmarksPath%') do (
set "url=%%a"
set url=!url:"=!
set url=!url: ADD_DATE=!
echo !url!
)) > %outputTxtPath%
echo URLs extracted to %outputTxtPath%
pause