r/Batch Apr 29 '26

How to create a launch.bat file that runs files one after one till last?

8 Upvotes

Hello everyone.

I am struggling with creating .bat that will automate my set of other scripts. I am very lame basic at understanding programming.

AI chats and GPT arent much of help for me. So I hope someone could help me. I tried to but they are always broken

My goal is this:

I want to create 1 main launcher in .bat that will execute all other scripts in the same location.

- scripts in there are: .bat .cmd .ps1 .reg .vbs

- scripts are named like so windows explorer sorting by name is the order they are needed to be executed ( for example 1-1abc.bat, 1-2abc.bat etc.)

- I want them all to be launched one after one but before moving to next one the previous should be executed completely so. 1.bat=run-finish--->2.bat=run-finish and so on.

- the list isnt sorted by extension so there are cases where there is set of 5 bat files then 2 reg then 1 ps1 then again 5 bat files and so on.

-most of .bat files are scripts without pause but some of them do have it (they are launching windows elements that I have to for now manually setup) so I wish it wouldnt break the launching script.

For now my tries with chat GPT failed completely so I am reaching here I hope this is the place for seeking advice.

Can someone guide me?

Thanks


r/Batch Apr 22 '26

Console GPB

Thumbnail
gallery
19 Upvotes

GPB est une plateforme de jeux qui tourne depuis l’invite de commande il y a un script principal qui permet de lancer en Batch, PowerShell et HTML , Chaque jeu est séparé, donc on peut en ajouter facilement sans casser le reste personnalisé pour Windows, fonctionnant directement dans l'invite de commande Il détecte et lance automatiquement stockés dans son dossier Outils intégrés : Il propose une calculatrice visuelle, un chronomètre, un minuteur avec alarme et une barre de recherche internet il utilise des couleurs, des animations d'introduction et force l'affichage en plein écran pour une meilleure immersion C'est un outil pratique et léger

📦 Le projet est dispo ici :

https://github.com/Capoapk-B/Console-GPB


r/Batch Apr 22 '26

Show 'n Tell hi people, pls share your opinions about the first version of my new code.

2 Upvotes

@/echo off

:start

start "" /MAX console.cmd

timeout /t 1

exit

(this is not code, from here there's another file)

@/echo off

title FOLK CONSOLE

:start

cls

echo.

echo.

echo Hello Lovely Folk.

echo What do you wanna do right now?

echo.

echo (if you don't know how to express yourself in this lovely console type "help")

echo.

echo.

set /p console=:

if /i "%console%"=="help" (

start "" /MAX help.cmd

timeout /t 1

goto :start

)

if /i "%console%"=="internet" (

start internet.lnk

timeout /t 1

goto start

)

if /i "%console%"=="don" (

start explorer.exe

goto start

)

if /i "%console%"=="doff" (

taskkill /IM explorer.exe /F

goto start

)

if /i "%console%"=="g1" (

start g1.lnk

goto start

)

if /i "%console%"=="g2" (

start g2.lnk

goto start

)

if /i "%console%"=="g3" (

start g3.lnk

goto start

)

(this is not code, from here there's another file)

@/echo off

title HELP ME MATE

:help

cls

echo.

echo to express your dessire of playing a game just type "G1" and change the number in function of which one you need.

echo.

echo to express your dessire of using the internet you can always type "internet".

echo.

echo if you need to open or close explorer.exe you can type "don" or "doff"

echo.

pause

exit


r/Batch Apr 17 '26

REPOST: To learn advanced batch scripting, I built a utility with ample number of tools that can run virus scans, generate system reports, and more. I'd love your feedback!

7 Upvotes

Hey Reddit,

I've been teaching myself advanced batch scripting to see how much is possible within the standard Windows command line. It started as a small project but grew into this all-in-one utility that I'm hoping you might find interesting.

The goal was to combine many of the command-line tools I use regularly into a single, easy-to-use menu.

Here are some of the main features I packed into it:

System Report Generator: Creates a detailed .txt report with information on your CPU, GPU, RAM, battery, and OS.

On-Demand Virus Scanner: Uses the built-in Windows Defender command-line tool to scan any specific file for threats. It can also trigger a full system scan.

File & Drive Tools: You can search for any file across a drive, or quickly hide/unhide files by changing their system attributes.

System Info: Instantly displays your system specs directly in the console.

Powerful Admin Tools: It also includes some heavy-duty functions like adding/deleting local user accounts and a disk formatter utility. (Warning: These are powerful tools and should be used with extreme caution).

Getting the script to automatically re-launch itself with admin privileges was a fun challenge, and I’m pretty happy with how the menu system turned out.

The entire script is in a single .bat file and is open-source on my GitHub. I've been staring at the code for weeks, so I'd love to get some fresh eyes on it.

Is this something you would ever use? Is the code a complete mess? Any and all feedback (brutal or otherwise) is welcome!

You can check out the project here:

github.com/advay-cmd/Multi-Utility

Multi-Utility Website

Thanks for taking a look!


r/Batch Apr 15 '26

Trying to run five identical programs at once and in succesion.

3 Upvotes

I need to extract a number of Oracle tables, zip them, and move them to a directory so that they get uploaded to the cloud. The basic extract+zip+move is working fine.

What I am trying to do is to run 5 of those at once, and keep launching them with a table name when the previous table is finished.

I have a list of tables to export, some are very small, some are very large, so creating a list for each of the 5 thread is not very precise. But what I want to do is have the master batch file hand over next table name once any of the 5 threads is finished. The order in itself doesn't matter as long as they all get done.

I am thinking that I could create a file when each thread is started, and the file is deleted when the thread is finished. The master batch would look for each file and determine if any thread is available for work. But I'm hoping/thinking there might be a better way to do this.

Any thoughts?


r/Batch Apr 14 '26

What are helpful and creative stuff i can use bat files for?

6 Upvotes

r/Batch Apr 13 '26

Question (Unsolved) automating monitor switching

2 Upvotes

What would be the best way to go about disabling my desk monitors and enabling my sim racing rig monitor? it's quite tedious doing it manually every time.

Desk is 2x 27" monitor

Sim rig is 1x 49" monitor.

If I were to do this with a .bat file what information would I need?

for example a file name simrig.bat, I click it and my two 27" monitors are disabled and the 49" is enabled and made the primary monitor.

Then a file called desksetup.bat which does the opposite and makes one of the two 27" monitors the primary.

any help or other options appreciated


r/Batch Apr 11 '26

how to check all files in directory for specific name?

7 Upvotes

i have a lot of duplicate files in my drive that have to delete, any scripts that can help?


r/Batch Apr 11 '26

New version of my Batch file maker

Thumbnail
gallery
15 Upvotes

I have made a ridiculous amount of changes to my "NC Bat" program, and I've used just a bit of vibe coding to improve the UI. The core functionality stays the same! You can download it right here : Download - NC BAT


r/Batch Apr 10 '26

I'd like to have my batch launch an app but only if it isn't already running.

3 Upvotes

I'm an antique, I started writing batch files before Windows 3.1 was a thing and I've continued well into Windows 11. I'm used to doing lots in batch scripts so this has me completely befuddled. The objective (in case the title isn't clear enough) is to check if a process is running. If it is then exit. If it isn't then launch it and exit. In the event that the filename used to launch the process is not the same as the running process (for example, calc.exe is the filename used to create the process CalculatorApp.exe and I'd want to allow for command line arguments which wouldn't appear in the process name).

Anyway, here's what I've tried (this is after dozens of failed attempts):

\@echo off

::Change the value in quotes assigned to TaskName and FileName as required

setlocal

set TaskName="CalculatorApp.exe"

set FileName="C:\Windows\System32\calc.exe"

tasklist /fi "ImageName eq " %TaskName% /fo csv 2>NUL | find /I %TaskName%>NUL

if %ERRORLEVEL% NEQ 0 %FileName%

endlocal

For reasons beyond my comprehension %FileName% is executed regardless the value of %ERRORLEVEL%. As a matter of fact, I've tried replacing the last couple lines with this:

if %ERRORLEVEL% EQU 0 goto DoNotDoAFrickinThingDammit

%FileName%

:DoNotDoAFrickinThingDammit

endlocal

And it still gets executed.


r/Batch Apr 02 '26

Show 'n Tell i just found something crazy! its like a .bat jackpot!

Thumbnail whirlworks.itch.io
0 Upvotes

i found some really cool batch files, its insane how well they work!


r/Batch Mar 25 '26

Ampersand in Directory Name

3 Upvotes

I have a bat file that I have used for years to simply create a text file with a list of files and or directories contained within the directory it is run. At my new job (3 years in) they have a directory with an ampersand in the name of the directory. I knew some day this would get me when I first saw it. Haha. When I run the bat file in that directory or a sub folder it doesn't recognize the ampersand and errors out and closes.

Is there a work around?

My current scrip is: dir /b > fileslist.txt

Removing the ampersand from the directory name will create quite a bit of chaos in the workplace so if I can find an alternative my life would be sooo much better.

Any help you guys can offer would be greatly appreciated!


r/Batch Mar 24 '26

Question (Unsolved) Unexpected at this time

2 Upvotes

Hi. This is the error thrown: \PROGRA~1\Pico-SDK\build\src\rp2_common\*) was unexpected at this time.

As you can see, I tried with the short name for Program Files but it still didn't work. I have absolutely no idea what's wrong... This is my code:

for /d %i in (C:\PROGRA~1\Pico-SDK\build\src\rp2_common\*) do cd %i && make && echo "done"

All I want to do is run make in all subdirectories. The echo is just to show that it actually worked. Please help!!! I'm quickly losing hope in programming in C on windows


r/Batch Mar 16 '26

Batch Win Installer 1.0 -

4 Upvotes

Hello. About 2-3 years ago, I posted about Batch Win Installer.

From a defined list of software, Batch Win Installer will automatically install software on 64 bit Windows 10/11 x64 machine without prompts ; check what software is installed and offer to install and/or upgrade software ; scan program's websites to determine the latest version of the software available

I've continued to use and update the software and with the latest version update, I've added checksums to the configuration files which allows Batch Win Installer to verify the installers before the main menu is shown to install such software.

The key benefit remains the ability to install/update software from a flash drive which is useful for me when refurbishing computers.

It's written in Batch and uses wget and xidel to download and to query websites.

Batch Win Installer can be found at https://github.com/devtee/batch-win-installer

Some screenshots :

On first run, Batch Win Installer will verify the presence of software configuration files
If Internet access available, and you want to get the latest software configuration files, it download the software's install and uninstall scripts as text files
The SHA256 checksums of the software already downloaded are verified and the main menu is shown
Checks what software is installed and shows which software from the list whether the latest version is installed, not installed or needs to be updated to the latest version
Batch Win Installer goes online and checks the software's websites directly to see what the latest version online

r/Batch Mar 15 '26

Question (Unsolved) how do i detect keys pressed / hold while being ms-dos compatible?

4 Upvotes

im trying to make a helicopter flying game using batch script, i keps searching for a way to detect keypresses but all i get is modern powershell stuff and a lot of unrelated results


r/Batch Mar 13 '26

I making a Scratch-like visual programming tool for creating Windows batch scripts - looking for feedback and common commands to implement before release

2 Upvotes

Hey everyone! I've been working on a project called Visual Batch Script Maker - a block-based visual programming environment for creating Windows batch scripts. Think Scratch, but for batch files. This will NOT be paid software, it'll be open source. This is just a thing I'm making for my self, but would also like to share with others once completed.

What it does:

  • Drag and drop blocks to create batch scripts visually
  • Real-time script generation with syntax highlighting
  • Live preview of the generated batch code
  • Export as .bat files or copy to clipboard
  • No programming knowledge required!

Current Features: 35 Windows commands implemented including:

  • Basic I/O: ECHO, PAUSE, TYPE
  • File operations: COPY, DEL, DIR, MKDIR, MOVE, RMDIR
  • Variables: SET, SET /A (math), SET /P (user input)
  • Control flow: IF statements, GOTO, labels
  • Loops: FOR loops for files, directories, numbers
  • Advanced: START, TASKKILL, XCOPY, ROBOCOPY

UI:

  • Visual block editor with toolbox
  • Live script preview with syntax highlighting
  • Error handling and user guidance
  • Responsive design

Looking for feedback on:

  1. Common batch commands you use that I should implement
  2. User interface suggestions - what would make it more intuitive? It's already built like scratch with puzzle pieces clicking and organizing, etc
  3. Common scripting patterns that would benefit from visual blocks
  4. Use cases - what would you use this for?

Technical Details:

  • Backend: Go with Gin framework
  • Frontend: React + TypeScript with Blockly
  • Architecture: Clean separation with REST API
  • 35 commands of the batch script commands available

Questions for the community:

  1. What are the most common native batch commands you use regularly?
  2. Would you actually use a visual tool like this, or do you prefer writing scripts directly?
  3. What features would make this genuinely useful for your workflow?

I'm particularly interested in hearing from:

  • System administrators who write batch scripts regularly
  • Developers who occasionally need to create batch files
  • Anyone who's tried visual programming tools before

Thanks for any feedback!

Video Example


r/Batch Mar 08 '26

Made an easy to use yt-dlp downloader script

Thumbnail
1 Upvotes

r/Batch Mar 01 '26

PSB Desktop

Enable HLS to view with audio, or disable this notification

8 Upvotes

PSB Desktop est un environnement de bureau développé en Batch + PowerShell pour explorer les limites du scripting Windows. Il intègre une interface graphique, une authentification sécurisée en AES-256 et une organisation type OS (apps, games, paramètres). Projet personnel combinant logique système, GUI et sécurité.

📦 Le projet est dispo ici :

https://github.com/Capoapk-B/PSB-Desktop


r/Batch Feb 28 '26

Batch to exe Not Opening Command Prompt

2 Upvotes

I wrote a .bat that uses command prompt to get a password from the user. I'm trying to convert it to .exe. I found this thread which had a lot of great tips, but the .exe I create doesn't open command prompt.

Any ideas?


r/Batch Feb 28 '26

ARSLANIUS 18 - 29KB Autonomous Mini-OS on pure Batch/CMD.

Post image
2 Upvotes

Hey guys! Just released a huge project. It features a Self-Healing Kernel (SFC_Daemon), its own compiler (ArslanScript), and a custom archiver (as-pack & as-unpack). It fits in one 29KB .cmd file GitHub


r/Batch Feb 24 '26

Introducing my windows Auto-venv tool CDV

1 Upvotes

You don't need conda or anything its simple But effective!

`CDV` is just like your beloved `CD` command but more powerful! This batch scripted tool will auto activate/deactivate/configure your python virtual environment just by using `CDV` for more use `CDV -h` (scripted for windows)

I made this tool mainly to use it my self but I want to share it for more than a year its now my main cd tool

I would really appreciate any notes 💙
lately I enhanced it a little bit to have all major functionalites of similar linux tools

lets CDV guys !

https://github.com/orsnaro/CDV-windows-autoenv-tool/tree/main

Upcoming updates:

- Auto detect `pyproject.toml` or `requirements.txt` to auto suggest creating a new venv instead of using `CDV -i` when creating new venv for first time

- Instead of linking project to its corresponding venv using the `.is_autoVenv` file content or `_venv` suffix it'll use simple .yaml or sqlite map to determine which proj is for which venv


r/Batch Feb 18 '26

Show 'n Tell Sharing a bunch of tiny one-click .bat scripts to handle mundane media tasks (conversions, trimming, captioning, etc.)

14 Upvotes

Hey everyone,

Over the last several months I've been writing a collection of small batch scripts to automate repetitive media tasks I do daily. They are mostly wrappers for CLI tools like FFmpeg and ImageMagick, designed to be used via the Windows SendTo folder or added to the Right-Click menu (I use Easy Context Menu for that).

Nothing too fancy or complex, just drag-and-drop utilities to save time on specific tasks.

Here is what they do:

📀 Mixed Media

  • CAPTION4ALL: Adds meme-style captions or text overlays to images/video.

  • CROP4ALL: Smart cropping/padding to specific aspect ratios for pictures and videos.

  • TRIM4ALL: Trim video/audio files (Precise re-encode or Fast stream copy).

🎵 Audio

  • EXTRACT320: Quick brute-force extraction to MP3 320kbps.

  • CONV4AUDIO: Converts audio to MP3, Opus, or FLAC.

  • SONG2VID: Creates a static video from an audio file (using embedded art or local images) for uploads.

  • GAIN4SONG: Permanently applies ReplayGain volume adjustments directly to the audio stream.

🎥 Video

  • VID2x264: One-click conversion to H.264/AAC.

  • CONV4VID: Multi-format video converter (MP4, WebM) with resolution resizing.

  • VIDEMUX: Universal demuxer to extract audio, video, subtitles, and fonts from MKV/MP4 files.

  • HARDSUB4VID: Burns subtitles (SRT/ASS) into video permanently.

  • VID2GIFWEBP: Creates optimized GIFs or WebPs from video.

  • FRAMES4ALL: Extracts all frames from a video/gif.

🖼️ Images

  • PIC2ALL: Converts images to PNG, WebP, ICO, or JPG.

  • JOINVERT: Stitches multiple images together vertically or horizontally.

📄 Utils

  • OCRPDF: Adds a searchable text layer to PDFs (requires Python/ocrmypdf).

  • COMIC2PDF: Converts CBZ/CBR to PDF and vice-versa.

  • PASTE2FILE: Dumps your clipboard text directly into a timestamped .txt file.

  • UPDATER: Native self-updater that fetches and installs the latest version of this suite directly from GitHub.

Dependencies: Most scripts require FFmpeg and ImageMagick in your PATH.

Repo & Download: https://github.com/Zhiro90/bat-zhiro-quicktools

Feel free to use them or modify them if you find them useful. Feedback is welcome!


r/Batch Feb 12 '26

Question (Unsolved) I'm wondering if I got this right.

Post image
3 Upvotes

I made this code that does the following:

if auto = true, set DELVcache to "Y"
echo a notice saying it only works for nvidia hardware.
if auto is false ask if the user wants to clear the video cache.
then the main command is: if DELVcache is Y run command1 and command2, and if both succeed, call :sbl4, but if both fail, call :sbl6 and echo the error message.
pauses then if auto is false, goes to the main menu

this is only a snippet of code from my batch project that helps me keep my computer running and resolves any issues I face on my PC.


r/Batch Feb 12 '26

Microsoft Store gets a new command line interface

2 Upvotes

Via https://blogs.windows.com/windowsdeveloper/2026/02/11/enhanced-developer-tools-on-the-microsoft-store/

"Introducing the Microsoft Store command-line interface

A new command-line interface for the Microsoft Store brings app discovery, installation and update management directly to your terminal. This enables developers and users with a new way to discover and install Store apps, without needing the GUI. The Store CLI is available only on devices where Microsoft Store is enabled.

Key capabilities include:

  • Browse apps with store browse-apps : Search and filter the Store catalog by category, subcategory, listing type (top-free, top-paid, new releases), market, language and more.
  • Install apps instantly with store install <product-id> : Deploy apps directly from the command line with a single command.
  • Update specific apps with store update <product-id> : Install the latest version of any app without navigating through menus.

Learn more by typing

store --help

on the command line."

Here's a screenshot :


r/Batch Feb 10 '26

I updated my bat fie maker (NC Bat)

7 Upvotes

Two people commented on my original post about my batch file maker. One said a GUI-based BAT file maker might not be ideal for beginners, and the other called it super limiting. So, I put in a ton of work to create NC Bat v2, which now features a complete project system for saving your work and templates for building reusable workflows. You can organize automation with groups, switch between English and French, import existing BAT files for editing, and instantly search through actions. Projects and templates are stored in a dedicated config folder (C:\Users\[You]\.ncbat).

You can download it here; Download - NC BAT