A BAT file (batch file) is a simple text file with .bat
extension that contains Windows command prompt (CMD) commands. When you double-click the BAT file, Windows runs those commands automatically.
YouTube video downloader chrome extension
https://github.com/archsyscall/youtube-video-downloader-chrome-extension/tree/master
✅ 1. BAT File Banane Ka Tareeqa (How to Create a .bat File)
Step-by-Step:
-
Desktop ya kisi folder me Right-click karein > New > Text Document.
-
Uska naam change karein aur
.txt
ko.bat
se replace karein. Example:youtube-downloader.bat
-
Right-click karein is file par > Edit.
-
Example code paste karein (assuming yt-dlp.exe isi folder me hai):
@echo off
set /p url=Enter YouTube video URL:
yt-dlp.exe %url%
pause
-
Save karein aur file ko double-click karein. Aap se YouTube URL poocha jaayega.
✅ 2. Requirements
-
yt-dlp.exe
ko usi folder me rakhein jahan.bat
file hai, yaC:\Windows\
me copy kar dein taake globally accessible ho. -
Internet connection required hai.
⚙️ Advanced Example (Audio-only MP3 Download)
@echo off
set /p url=Paste YouTube video URL:
yt-dlp.exe -x --audio-format mp3 %url%
pause
❗ Tips
-
pause
command program ko ruk kar rakhta hai taake aap output dekh saken. -
Aap
.bat
file ko desktop pe shortcut ke zariye bhi use kar sakte hain.
Agar aap chahte hain ke mein aap ke liye ek complete .bat
script file banakar doon jo aap sirf double-click karein aur video download ho jaye, toh bataiye.
Great! Here's a minimal solution using a .bat
file with a basic Windows input box and a button, no Python required.
<!DOCTYPE html>
<html>
<head>
<title>Run yt-dlp Batch File</title>
<style>
body { font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; }
button { padding: 10px 20px; background: #0078d7; color: white; border: none; cursor: pointer; }
#batchContent { width: 100%; height: 100px; font-family: monospace; }
</style>
</head>
<body>
<h1>Run yt-dlp via Batch File</h1>
<p>1. Paste a YouTube URL below:</p>
<input type="text" id="ytUrl" placeholder="https://youtube.com/watch?v=..." style="width: 100%; padding: 8px;">
<p>2. Copy this batch script:</p>
<textarea id="batchContent" readonly></textarea>
<button onclick="generateBatch()">Generate Batch File</button>
<button onclick="copyBatch()">Copy to Clipboard</button>
<p>3. Save as <code>download.bat</code> and double-click to run.</p>
<script>
function generateBatch() {
const url = document.getElementById('ytUrl').value.trim();
if (!url) {
alert("Please enter a YouTube URL!");
return;
}
const batchScript = `@echo off\nyt-dlp.exe "${url}"\npause`;
document.getElementById('batchContent').value = batchScript;
}
function copyBatch() {
const batchScript = document.getElementById('batchContent').value;
if (!batchScript) {
alert("Generate the batch script first!");
return;
}
navigator.clipboard.writeText(batchScript)
.then(() => alert("Batch script copied! Paste into a .bat file."))
.catch(err => alert("Error copying: " + err));
}
</script>
</body>
</html>
Step-by-step: Minimal YT-DLP GUI using Batch + VBScript
1. Create a new file named yt-dlp-gui.bat
with the following content:
@echo off
:: Launch VBScript input box
set "vbsfile=%temp%\inputurl.vbs"
echo Set objArgs = WScript.Arguments > "%vbsfile%"
echo url=InputBox("Enter YouTube URL:","YT-DLP Downloader") >> "%vbsfile%"
echo If url = "" Then WScript.Quit >> "%vbsfile%"
echo WScript.Echo url >> "%vbsfile%"
for /f "delims=" %%i in ('cscript //nologo "%vbsfile%"') do set "video_url=%%i"
del "%vbsfile%"
if "%video_url%"=="" (
echo No URL entered.
pause
exit /b
)
:: Run yt-dlp with the entered URL
yt-dlp.exe %video_url%
pause
2. Place yt-dlp.exe
in the same folder.
3. Double-click yt-dlp-gui.bat
to launch. It will:
-
Ask for a URL
-
Download the video using
yt-dlp
-
Pause after completion so you can read the output
Let me know if you want to add quality options or a download folder chooser too.
Option 1: Use a Batch File with a Button (HTA)
You can create a small HTML Application (HTA) file with a button that runs yt-dlp.exe
.
1. Create a file called yt-dlp-gui.hta
:
<html>
<head>
<title>YT-DLP Downloader</title>
<HTA:APPLICATION ID="app" APPLICATIONNAME="YTDLP" BORDER="thin" BORDERSTYLE="normal" CAPTION="yes" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes"/>
<script>
function downloadVideo() {
var url = document.getElementById("url").value;
var shell = new ActiveXObject("WScript.Shell");
shell.Run("cmd /k yt-dlp.exe " + url);
}
</script>
</head>
<body>
<h3>YouTube Downloader</h3>
<input type="text" id="url" size="50" placeholder="Paste video URL here">
<br><br>
<button onclick="downloadVideo()">Download</button>
</body>
</html>

EmoticonEmoticon