Home

Code Samples

This page is dedicated to code samples and snippets that I've collected. No syntax highlighting here, just pure pre-formatted text, baby!


Batch Script Samples

A long time ago I used to write small batch scripts in MS-DOS, mainly to create little menu systems to launch other programs or to automatically set the prompt to something other than the default "C:\>_". Later in life when I eventually landed a job in the technology field, I continued writing batch scripts for some reason, even when it was wildly innappropriate to do so and there were far better tools available to do the same job.

Hello World

Here is a small batch script that displays a message to the user and then waits for the user to press the "any" key.

@echo off

set enabledelayedexpansion
set MSG=Hello World!
echo %MSG%
echo.
echo Press the "any" key to continue...
pause > nul
		


Back to the top