Batch (WINDOWS) Programming Thread

mrgcat

New Member
Hello

Saw there wasn't a thread for batch programming, and recently seeing how powerful it is thought it would be a good idea to create one. :D
Please post any batch related stuff here.

Collection of useful scripts:


Thanks
 
Last edited:
Got a quick text searcher for .txt's, it searches for the text you decide in the .txt's in the same directory. It outputs the results to results.txt.

Code:
@ECHO OFF
SET /P userin=Please type what you want to search for:
findstr /m %userin% *.txt > results.txt
if %errorlevel%==0 (
echo Found! logged files into results.txt
) else (
echo No matches found
)
PAUSE

Will post more when i make them.
 
I made a small batch script once which deletes as much as data as possible on the C: drive as soon as the USB stick is plugged in the computer.
Of course the USB stick had that batch script and of course the process is completely hidden from the screen so the user has no idea what the hell is going on lol.
Kinda maliciously I know xD

Batch rules,but I still prefer C# more lol.
 
I made a small batch script once which deletes as much as data as possible on the C: drive as soon as the USB stick is plugged in the computer.
Of course the USB stick had that batch script and of course the process is completely hidden from the screen so the user has no idea what the hell is going on lol.
Kinda maliciously I know xD

Batch rules,but I still prefer C# more lol.

I use C++ mainly, but went to this as it is better for little scripts in my opinion.
How did you make it as soon as the USB is plugged in?
 
Back
Top