Search found 1 match

by Lirk
15 Mar 2025 09:19
Forum: DOS Batch Forum
Topic: Newline character as delimiter in for-loop
Replies: 12
Views: 25598

Re: Newline character as delimiter in for-loop

Code: Select all

@echo off
setlocal EnableDelayedExpansion
:begin
set /p url=YOUTUBE LINK: 
for /f %%a in ('yt-dlp -g %url% -f "bv*[vcodec^=avc1][ext=mp4][height<=720]+ba[ext=m4a]/b[vcodec^=avc1][ext=mp4]/b"') do set /a url+=1 & set "url!url!=%%a"
mplayer "%url1%" -audiofile "%url2%"
cls
goto :begin