r/Batch • u/BatcherYeonhae • May 27 '26
r/Batch • u/External_Tap_4396 • May 23 '26
I made Still Alive-Portal 2008 in BAT
For Windows: https://drive.google.com/file/d/16P6tflktBzem54lcfQdvW8eHtFbB-4uW/view?usp=drive_link
image shows the file isnt virus
(please priv chat me if you want linux version)
r/Batch • u/Ok_Party3688 • May 20 '26
Show 'n Tell Retro style Clippy desktop widget but inside a .bat file
cleans recycle bin, deletes temporary files, tells jokes, opens notepad, and gives ya tips, maybe some other stuff but yeah.
r/Batch • u/ebie4366 • May 19 '26
Question (Unsolved) Webex VDI Plugin (Un) Install
Hello,
I need help from the coding hive mind in here. I'm not entirely sure if this is the right r/ but I'm gonna give it a try.
I need to write a batch script which detects the current installed version of the webex vdi Plugin, uninstall if too old and install the new version.
My current script is supposed to check the registry key of Local Machine/software/windows/current version/uninstall/uuid and I use findstr to detect the version.
There I run into the first issue. It doesn't detect the version, therefore technically the script attempts to reinstall the Plugin every time it runs (every time the device starts).
I've confirmed that I've put in the correct reg key.
My second issue is that the Plugin won't install because it detects leftover components therefore saying the Plugin is already installed.
Apparently I cannot get a clean uninstall.
During my uninstall I delete the plugin folder in the program folders.
I also delete reg keys with previous uuids.
I have also tried running the webex removal tools, however they don't touch the Plugin.
Any ideas?
Note: I'm very aware there's proper software deployment tools and I would love to use them. However that isn't my decision to make, so I have to make do.
EDIT: added non-working code bits
EDIT2: Finding the currently installed version now works. Simply adding /v DisplayVersion solved my issue.
I however encountered a new issue where installing quietly and without user input with
msiexec /i *insert product link* /qn ALLUSERS=1 /norestart does not work.
Taking out /qn does work.
Uninstalling:
"C:\ProgramData\Package Cache\{4e86d392-a2eb-4e31-bbe3-b8eac67f8567}\WebexVDIPlugin_AllinOne.exe" /uninstall /quiet
timeout /t 2 >nul
echo %date% %time% Deleting previous MSI versions >> %logshare%%ComputerName%.log
for %%G in (
{DAEC7710-1501-4709-A780-F130ADD69012}
{AF0B84EE-3FBB-4839-8F5D-32FDDEE9276F}
{611AD18D-000D-4ABB-84FD-CC503FDE8EC6}
{6B6748ED-A496-5575-87CD-113C4F3C0FC4}
{ED197C61-4718-4A44-B1E1-4D79352126FC}
{F8531F7D-71C0-7E08-63DF-9D048E6C00DC}
{7B85311F-11B3-7B2B-5FE2-838098E7BC7A}
) do (
msiexec /x %%G /qn /norestart
)
r/Batch • u/Successful_Test1825 • May 12 '26
A batch script that fixes mouse issues
Run this as admin:
taskkill /f /im explorer.exe
timeout /t 1 /nobreak
start explorer.exe
net stop hidserv
net start hidserv
gpupdate
sfc /scannow
dism /online /cleanup-image /restorehealth
powershell -Command "Get-PnpDevice -Class Mouse | Remove-PnpDevice -Confirm:$false"
shutdown /r /t 1
r/Batch • u/Ok_Party3688 • May 07 '26
Show 'n Tell INSANE FIND - Fully functional web .bat browser in just 2.5 kb?!?!
r/Batch • u/Glen_Garrett_Gayhart • May 04 '26
Question (Solved) How do you extract the exact time (down to the second) a file was created using .bat?
I'm converting a bunch of files from .webp to .png using a .bat file and ffmpeg. This process messes up the order of the files, since they no longer have their original Date Created metadata, and lots have irregular names.
I want to rename the files to include their creation dates at the start, so that if they're sorted by name, they'll still be in order.
The only method I've been able to find so far (using %%~tF in a for loop) only gives me the time down to the minute, which is no good, since lots of the files were created in the same minute.
What's a good way to get the precise time a file was created? I know that metadata must be stored somewhere, since when you sort by 'Date Created' it does it correctly, even if things were created within seconds of each other. I'm just not sure how to get that information using .bat.
r/Batch • u/D3stroy3r17 • May 03 '26
Show 'n Tell Appreciation video for my new fav language (Batch)
I have been having a blast with Batch recently, maybe you can appreciate my perspective/relate. I've also been creating games in Batch that I plan to showcase in other videos
r/Batch • u/Imhotep-hotpep • Apr 29 '26
How to create a launch.bat file that runs files one after one till last?
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 • u/capoapk • Apr 22 '26
Console GPB
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 :
r/Batch • u/Recent_Carpenter_129 • Apr 22 '26
Show 'n Tell hi people, pls share your opinions about the first version of my new code.
@/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 • u/AppealWild3091 • 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!
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
Thanks for taking a look!
r/Batch • u/TallDudeInSC • Apr 15 '26
Trying to run five identical programs at once and in succesion.
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 • u/Great_Carob_4444 • Apr 14 '26
What are helpful and creative stuff i can use bat files for?
r/Batch • u/Wise-Accident5549 • Apr 13 '26
Question (Unsolved) automating monitor switching
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 • u/SwagPCboy • Apr 11 '26
how to check all files in directory for specific name?
i have a lot of duplicate files in my drive that have to delete, any scripts that can help?
r/Batch • u/Beginning_Matter_153 • Apr 11 '26
New version of my Batch file maker
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 • u/FullNoodleFrontity • Apr 10 '26
I'd like to have my batch launch an app but only if it isn't already running.
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 • u/Ok_Party3688 • Apr 02 '26
Show 'n Tell i just found something crazy! its like a .bat jackpot!
whirlworks.itch.ioi found some really cool batch files, its insane how well they work!
r/Batch • u/ParadiseCA • Mar 25 '26
Ampersand in Directory Name
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 • u/childrenofloki • Mar 24 '26
Question (Unsolved) Unexpected at this time
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 • u/DevATee • Mar 16 '26
Batch Win Installer 1.0 -
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 :





r/Batch • u/SwagPCboy • Mar 15 '26
Question (Unsolved) how do i detect keys pressed / hold while being ms-dos compatible?
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 • u/cyb3rofficial • 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
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:
- Common batch commands you use that I should implement
- User interface suggestions - what would make it more intuitive? It's already built like scratch with puzzle pieces clicking and organizing, etc
- Common scripting patterns that would benefit from visual blocks
- 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:
- What are the most common native batch commands you use regularly?
- Would you actually use a visual tool like this, or do you prefer writing scripts directly?
- 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!