the title says what i'm trying to do, but the code is not working for some reason, why?
Code:
@echo off
cd /d D:\123\p\youtube-dl\
start "" link.txt
:loop
timeout /t 1
type link.txt | findstr /i /c:"youtube"
if %errorlevel%==0 (set /p link=<link.txt
youtube-dl %link%
echo empty > link.txt
taskkill /im notepad++.exe /f
exit)
goto loop