r/batchfiles • • Aug 03 '24

Batch / shell scripting book

Post image
0 Upvotes

Windows NT shell scripting by Tim Hill.

Old but good. Saved me many hours over my career.


r/batchfiles • • Sep 06 '23

My Total Cleaner Project ?

0 Upvotes

Greetings to everyone! I developed a MS-DOS based Batch (.BAT) and PowerShell script. It does things like antivirus, cleaning and so on, and Total cleaning application.

Note: it has a cool and nice GUI. (Windows Forms)

I'm thinking of converting it to an .exe file and creating my own software.

Actually, I don't have a problem with selling it, my aim is to gather a little community. How do you think the number of downloads will be?

Can I deal with and promote this software with an online software marketplace ?

I also coded 5% of it with chatgpt.

What do you think?

Who supports me ?

Thanks.


r/batchfiles • • Mar 22 '21

Fake friendly virus

1 Upvotes

I made a virus that does absolutely nothing to a pc but only shuts it down. Theres this "code" I made for it to shut off but im confused at where to put it in the main line of code? Do I put it at the end or beginning

u/echo off

pause
timeout 1800

shutdown -s


r/batchfiles • • Nov 23 '25

Add a microsoft user to a windows pc using batch

0 Upvotes

I want to add some Microsoft accounts to a windows pc from a list with onlh a email


r/batchfiles • • Jul 08 '25

Ripping and Decrypting contents

5 Upvotes

If anyone wants anything from Disney plus, Netflix, Prime, OSN Plus, Starz, HBO, etc… I have my own L3 decrypt


r/batchfiles • • May 29 '23

Question

1 Upvotes

Is it possible to make a bat file connecting to an outlook signature?


r/batchfiles • • Jun 18 '23

I need help

1 Upvotes

Im attempting to find some way to shuffle the names around of all files in a program, example being the files mar.arc lol.arc and your.arc all switch names but retain the data within them


r/batchfiles • • Aug 12 '17

Mah Youtube channel.

1 Upvotes

Go here if you're interested in coding and such: https://www.youtube.com/channel/UCkVtfeNZZSTomoZ3SnkBWdw


r/batchfiles • • Dec 23 '20

trying to run a batch file that creates an m3u playlist

1 Upvotes

Hello, folks,

I found this that shows you how to take the sub dir and create a playlist of your mp3. I create and save the file as Make_Playlist3.bat and ran it but nothing happened. Am I saving the file type wrong or is there anything I need to tweak. My folders are located on my NAS (/volume5/MUSIC/Christmas/Christmas Playlist) any suggestions please and thank you in advance


r/batchfiles • • Nov 16 '20

how to execute terminal commands with a batch file

2 Upvotes

i have a problem with my internet that ive remedied by executing 'netsh wlan set autoconfig enabled=yes interface=wi-fi', connecting to the wifi, and then again but 'enabled=no', which works fine, but im trying to create a batch file that, when run, executes the first command, wait long enough for my pc to connect to the wifi, and then runs the other command again. can anyone help write the file please?


r/batchfiles • • Apr 21 '20

My Batch Files + Find partnership

1 Upvotes

Hello everyone!

I created some 'programs' / 'games' out of passion and to pass the time.

I want to tell you what you think about them and how I could improve them.

If you find bugs tell me.

Calculate: http://www.mediafire.com/file/5ted07ykzjk8qfv/Calculate.bat/file

Flag: http://www.mediafire.com/file/kcjsbfm0yh0bkge/Flag.bat/f ile

Guess Number: http://www.mediafire.com/file/tf73ya53y77tv7n/Guess+Numb er.bat

HackSimulator: http://www.mediafire.com/file/16tui34b585q1gr/HackSimula tor.bat/file

Loto: http://www.mediafire.com/file/pm3ws836g4y4zot/Loto.bat/f ile

Lucky Number: http://www.mediafire.com/file/if7670iox4x6a9a/Lucky+Numb er.bat

RandomGame: http://www.mediafire.com/file/p1b2bocr4grqapc/RandomGame .bat/file

StartPrograms: http://www.mediafire.com/file/ye85il2xfjohsd4/StartProgr ams.bat/file

StartProgramsV2: http://www.mediafire.com/file/4ln8gmldl4zfsx7/StartProgr amsV2.bat/file

StartProgramsV3: http://www.mediafire.com/file/ao5n4b8idum6i8b/StartProgr amsV3.bat/file

StartProgramsV4: http://www.mediafire.com/file/ia94o14avhmonsy/StartProgr amsV4.bat/file

Time: http://www.mediafire.com/file/hy42vmwjhpls9db/Time.bat/f ile

TicTacToe: http://www.mediafire.com/file/s2kmbom72zugfph/TicTacToe.bat/file

Clock Alarm: http://www.mediafire.com/file/rf2hk887jpd2ld3/Clock+Alarm.rar

PingView:https://www.mediafire.com/file/q48cg6qhdtdlq88/PingView.bat/file

WebCreator:https://www.mediafire.com/file/xfx8ot9fm0xdjgr/WebCreator.bat/file

SlotMachine:https://www.mediafire.com/file/ewsl4p7ebq7gccb/SlotMachine.bat/file

Roulette: https://www.mediafire.com/file/54jjd0zk7f1gl6b/Roulette.bat/file

BlackJack: https://www.mediafire.com/file/fwi5j1eprwnq6pw/BlackJack.bat/file

I want help with scripting + ideas for more Batch Files. Now I need ideas + helping at an update.

If you want to help me we will work in Codepile.

I wait you!


r/batchfiles • • Apr 05 '20

Refresh multiple webpages on command

1 Upvotes

I want to write a bat file that will refresh multiple webpages in chrome on command. Basically I’m a tech in a factory and we have dashboards for every machine on an individual webpage. Occasionally they time out or we switch WiFi networks to remote into the machines and I want a way to refresh multiple chrome webpages at once so I can see the machine dashboards live again when I switch back.


r/batchfiles • • Mar 21 '19

My new auto batch creator tool

5 Upvotes

Anyone wanting a more fun and easy way to make advanced batch files, I just released my new tool for creating them called Auto Batch! If there's any features you think I should add, lmk https://www.youtube.com/watch?v=cRJS_MZG_K4


r/batchfiles • • Dec 11 '22

Need a simple batch file to move files

1 Upvotes

Sub looks pretty dead so idk if I'll get any responses, but I'm looking to create a basic batch file to automatically move some files. It seems like it should be fairly straightforward, but I'm clueless.

I have an app that easily will create the subfolder based on the file name and place the file inside, however I'm not sure how to do this en masse if the folder already exists.

Folder layout is like so:

Parent folder
\Subfolder 1
- files go here
- other files also live here
\Subfolder 2
- files go here
- other files also live here
- Subfolder 1.ext
- Subfolder 2.ext

I just need to sort each of the files in the parent folder into the existing, corresponding named subfolder.

TYIA!


r/batchfiles • • Dec 13 '22

Advice on batch file or another solution

1 Upvotes

Im looking to do a batch file that searches an ini file for value Surf__088, capture this value then search for Null which is a few lines later & replace Null with 088 but adding an extra 0 to the start of the value, the Surf__ value is always changing so the proceeding null value needs to change accordingly. any advice on making a batch file for this task, thanks.


r/batchfiles • • Feb 14 '20

Find and replace text using a batch file

1 Upvotes

Hello, I need to preform a search and replace in a .txt file using a .bat file. What would this syntax look like?


r/batchfiles • • May 11 '21

Widevine L3 Decrypted Film Downloader Batch for Prime Video

3 Upvotes

This is was done for Amazon Prime Video mostly, change it to your own needs.

Based off u/Own_Western8448 post

Programs needed: N_m3u8DL-CLI_v2.9.7.exe, ffmpeg, mp4decrypt.exe, mkvmerge.exe IN THE SAME FOLDER

-----------------------------------------------------------------------------------------------------------------------------------------------------

@ echo off

set path=C:\Rips

echo.

set /p folder= Video Name to be Saved as (No spaces - use underscore between words '-'):

echo.

mkdir C:\Rips\%folder%

set /p stream=Input MPD from stream detector:

N_m3u8DL-CLI_v2.9.7.exe "%stream%" --workDir C:\Rips\%folder% --saveName "stream" --enableDelAfterDone --enableMuxFastStart

ren C:\Rips\%folder%\stream(Audio).*

ren C:\Rips\%folder%\stream.* stream.mp4

echo.

set /p vidkey=enter video key:

echo.

set /p vidkid=enter video kid:

echo.

set /p audiokey=enter audio key:

echo.

set /p audiokid=enter audio kid:

echo.

echo Video being created.........

mp4decrypt.exe --key %audiokid%:%audiokey% C:\Rips\%folder%\stream(Audio).aac C:\Rips\%folder%\decrypted-audio.aac

mp4decrypt.exe --key %vidkid%:%vidkey% C:\Rips\%folder%\stream.mp4 C:\Rips\%folder%\decrypted-video.mp4

mkvmerge.exe -o C:\Rips\Rips\%folder%.mkv C:\Rips\%folder%\decrypted-video.mp4 C:\Rips\%folder%\decrypted-audio.aac

cls


r/batchfiles • • May 10 '21

Program: World Entanglement

1 Upvotes

So, a friend of mine wants to back up a Minecraft world to drop box. I call it world entanglement because I heard I can use /MIR to make them mirror eachother (like quantum entanglement. That's a poorly done physics joke)

I'm making a batchfile to do that easily (because he's NOT AT ALL tech literate).

I'm running into a bunch of issues as this is my first time makeing a batch file. ICan someone help me? (current code pasted below:)

Echo "World Entangler By CS64"

Echo version Beta 2.3

pause

Echo Starting world entanglement...

tree

robocopy C:\Users%username%\AppData\Roaming.minecraft\saves C:\Users%username%\Desktop smpworld /MIR

echo entanglement complete.

pause

exit

FYI: I put tree in there for some visual flare since it does nothing but looks cool to someone who doesn't know much. Please ignore it.


r/batchfiles • • Oct 03 '24

New to batch files, need help with a pinger program

1 Upvotes

Just to start off, I'm on the network/hardware side and haven't dabbled in programming since College (visual basic and C++ anyone??)

At my last job we had a few guys that would mess around and create shortcuts or batch files for certain commands we would use frequently. The one I need help with, and is probably small time for some, is a continuous pinger batch file that started pinging when the IP address was highlighted (like copy/paste without having to paste, it just starts).

I no longer have that work PC and would love to try this again, been reading a little but only things I can find on it are for multiple IPs or coloring guide for when the pings are successful vs not successful.

Any help is greatly appreciated!


r/batchfiles • • Sep 26 '24

Simple Batch script for Installing MS Teams

1 Upvotes

Super rusty at making these.

Trying to make a simple way to execute a bootstrapper.exe program which is required to install the New Teams Classic.

MSFT says they prefer Powershell but it will run without

uecho off

XCOPY "*\\SERVERSHAREPATH\*Microsoft\Teams\MSTDK" C:\temp\MSTDK

cd "C:\temp\MSTDK

start .\teamsbootstrapper.exe -p -o "C:\temp\MSTDK\MSTeams-x64.msix"

Exit

Does this look correct. when I run on a PC it does tech work but everything is showing..I thought echo off hides it?


r/batchfiles • • Jul 25 '22

path with spaces inside loop

1 Upvotes

The below code works fine with files with no spaces, but when a file with spaces is selected, it would fail thinking the part before the space is the file selected.

full script is here: https://github.com/pl643/windows-scripts/blob/main/fzf_start.bat

fzf.exe return a file path like below:

"Documents\file.txt" <-- works

"Documents\file with space.txt" <-- fails

I tried putting quotes around %%f like "%%f", but it just opens a new "cmd" screen after the selection.

FOR /F "tokens=* USEBACKQ" %%F IN (`fzf.exe`) DO (

start /b %%F

rem start /b "%%F" fails with a cmd windows

)


r/batchfiles • • Jul 01 '24

Closing file after opening

1 Upvotes

I have some code in a batch file that opens an mp3 (in the same folder as batch file) and I want it to close after 5 seconds, but I don't know how to close it. Here is the code, and thanks to anyone who can help.

@echo off

echo this is a test to open and close a file.
timeout 3 > nul
start definotsponge.mp3
timeout 5 > nul
REM add a way to close definotsponge.mp3 after 5 seconds.

r/batchfiles • • Jul 11 '24

Can anyone help me pass variables from batch files to VBS files?

1 Upvotes

I am trying to program a key binder type thing to bind keys to words and since you can't print keys in batch, I need to move lots of variables to VBS. Does anybody have any suggestions?


r/batchfiles • • Nov 16 '16

Need help with batch file

1 Upvotes

Start this batch file in the itsc1325 folder

1.Display the current time (without changing it) into a file called time.txt in the itsc1325 folder 2.Append the current date (without changing it) into the time.txt file 3.Display the contents of itsc1325 folder 4.Pause the batch file 5.Ping google.com and save the results in ping.txt into the itsc1325 folder 6.Display the contents of ping.txt 7.Save the windows ip configuration information to a file called ip.txt in the itsc1325 folder 8.Append the mac address and transport name to ip.txt 9.Display the contents of ip.txt 10.Pause the batch file 11.Display the contents of the itsc1325 folder 12.Pause the batch file 13.Concatenate all .txt files in itsc1325 into c:\test\sysinfo.txt 14.Remove the itsc1325 folder and its contents with verification 15.Pause the batch file 16.Display the contents of sysinfo.txt 17. Clear the screen

Submit the batch file as an attachment with a .txt file extension. Do not paste entry into the submission box. Good Luck!


r/batchfiles • • May 18 '16

My Batch/CMD Template

1 Upvotes

This is the template I use to create all of my batch/cmd files.

@ECHO OFF
MODE CON:COLS=80 LINES=30
COLOR 02
TITLE "A Bunch of Random Stuff Here"
REM ============================================================================================
REM [        TITLE:
REM [
REM [  DESCRIPTION:
REM [
REM [
REM [
REM [       AUTHOR:
REM [
REM [         DATE:
REM [
REM [      VERSION:
REM [
REM [ DEPENDENCIES:
REM [
REM [        NOTES:
REM [
REM ============================================================================================
: checkPriv
    NET FILE 1>NUL 2>NUL
    IF '%errorlevel%'=='0' ( GOTO gotPriv ) ELSE ( GOTO getPriv )
:getPriv
    IF '%1'=='ELEV' ( SHIFT & GOTO gotPriv )
    SETLOCAL DisableDelayedExpansion
    SET "batchPath=%~0"
    SETLOCAL EnableDelayedExpansion
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
    ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
    "%temp%\OEgetPrivileges.vbs"
    EXIT /B
:gotPriv
    SETLOCAL & PUSHD.
    CLS & ECHO.
:main
    :: Rest of script continues here... (Remove this Line)

It will also auto prompt for UAC elevation. If you are not admin, then you will not be able to run it. You can also right click and run as admin, but that would defeat the purpose of the auto elevate script. Unfortunately, I cannot remember the fellow who came up with the auto elevation part, otherwise, I would give credit where credit is due. I want to say his name was Matt...?