Gammadyne Corporation

Gammadyne's Free DOS Utilities

Gammadyne Corporation offers the following DOS command line programs which you may download and use freely.  If you find them useful, please make a donation.

Notes

  • These programs run on all versions of Windows since 95.
  • You may distribute these programs as long as they are not modified or sold.  If you would like to package them with a commercial program, please contact us.
  • These programs do not have a graphical user interface.  They are meant to run from a command line (DOS prompt), batch file, or shortcut.  You should keep your command line programs in a directory on your hard drive, preferably one in the PATH.  For Windows 95/98/ME, we recommend "c:\windows\command\".  For Windows NT4/2000/XP/2003/Vista/2008/7 we recommend "c:\windows\system32\".
  • These programs are checked for viruses before being uploaded.  We do value our reputation!
  • The End-User License Agreement can be found here.
  • Please send comments on these programs here.
  • These programs are written by Greg Wittmeyer.


Program Index

backup9.exe BACKUP9.EXE - File Backup Utility
combine.exe COMBINE.EXE - File Combining Utility
delnext.exe DELNEXT.EXE - Delete At Next Reboot Utility
dels.exe DELS.EXE - Recursive File Deletion Utility
fcmp.exe FCMP.EXE - File Comparison
firewall.exe FIREWALL.EXE - Windows Firewall Configuration Utility
gpatch.exe GPATCH.EXE - File Patching Utility
gs.exe GS.EXE - Greg's DOS Shell
numlines.exe NUMLINES.EXE - Source Code Line Counter
pechksum.exe PECHKSUM.EXE - Portable Executable Checksum Utility
sizeof.exe SIZEOF.EXE - File Size Reporting Utility
sleep.exe SLEEP.EXE - Power Management Utility
startas.exe STARTAS.EXE - Executes a DOS command line under a different user account.
timer.exe TIMER.EXE - Timer Utility
wol.exe WOL.EXE - Wake On LAN

BACKUP9.EXE

The BACKUP9.EXE utility will maintain a number of backups (9 by default) of a file.  For example, this command:

backup9.exe c:\baz\foo.bar


Will generate these backup files:

c:\baz\foo.bar.bk1
c:\baz\foo.bar.bk2
c:\baz\foo.bar.bk3
c:\baz\foo.bar.bk4
c:\baz\foo.bar.bk5
c:\baz\foo.bar.bk6
c:\baz\foo.bar.bk7
c:\baz\foo.bar.bk8
c:\baz\foo.bar.bk9


Where foo.bar.bk1 is the most recent backup, foo.bar.bk2 is the next most recent backup, et cetra.  Please note that this assumes that backup9 was called 9 times, and the original file changed each time.


Usage

backup9 [/a] [/e] [/i] [/l#] [/m] [/nologo] [/q] [/s] [/v] filespec [target]

Where filespec is a specification of the file(s) that should be backed up, and target is the directory where the backup files should be created.

Switches:
/aAlways perform backup, even if no change since last backup.
/eReplace the source file's extension instead of appending.
/iIgnore errors in the file specification.
/lNumber of backup levels, from 1 to 999 (defaults to 9).
/mMaintain the directory structure.  This is only applicable with the /s switch and a target directory.
/nologoSuppress logo banner.
/qQuiet mode - no banner or operation status.
/sRecursively enter subdirectories.
/vVerbose mode.


Notes

  • The filespec can contain the wildcard characters, the asterisk (*) and the question mark (?).  It can also include multiple files separated by semi-colons.
  • If the target directory does not already exist, it will be created.  If no target directory is specified, the backup files are created in the same directory as the source file.
  • If either the filespec or target parameter contains spaces, it should be enclosed in quotes.
  • No backup is made if the file has not changed since the last backup.
  • If a file is locked, backup9 will retry up to 10 times over a one second period.  This is helpful for files that are sometimes briefly locked, like a database.
  • Pressing the Escape key will interrupt the operation.


Example #1:  Specifying a Target Directory

backup9 /l3 c:\baz\foo.bar d:\target


Produces these backups:

d:\target\foo.bar.bk1
d:\target\foo.bar.bk2
d:\target\foo.bar.bk3



Example #2:  Wildcard, Long Path

backup9 /l3 "c:\baz\foo bar.*"


Might produce these backups:

c:\baz\foo bar.dat.bk1
c:\baz\foo bar.dat.bk2
c:\baz\foo bar.dat.bk3
c:\baz\foo bar.txt.bk1
c:\baz\foo bar.txt.bk2
c:\baz\foo bar.txt.bk3



Example #3:  Multiple Files

backup9 /l3 c:\baz\foo.dat;bar.txt


Produces these backups:

c:\baz\foo.dat.bk1
c:\baz\foo.dat.bk2
c:\baz\foo.dat.bk3
c:\baz\bar.txt.bk1
c:\baz\bar.txt.bk2
c:\baz\bar.txt.bk3



Example #4:  Replacing Extensions

backup9 /l3 /e c:\baz\foo.bar


Produces these backups:

c:\baz\foo.bk1
c:\baz\foo.bk2
c:\baz\foo.bk3



Download

Click here to download version 2.2 of BACKUP9.EXE (released 27-Aug-2010).

COMBINE.EXE

COMBINE.EXE is a program that combines two or more files into a single file.


Usage

COMBINE [/a] [/lb] [/nolist] [/nologo] [/nosum] [/s] target file1 file2 ...


Where target is the name of the new file to be created, and file1, file2, etc. are the files containing the data that is to be combined into the new file.

Switches:
/aDo not overwrite the existing contents of the target file. Instead, append to the end of the target file.
/lbBefore a source file is added to the target file, a line-break will be added to the end of the target file if one is not already present.
/nolistDo not list each file.
/nologoDo not display the program banner.
/nosumDo not display the operation summary.
/sRecursively enter subdirectories.


Notes

  • The ? and * wildcard characters are permitted.
  • If no path to the target file is specified, the target file is created in the current working directory.
  • Any filename that contains spaces should be enclosed in quotes.
  • The user may press Escape to abort the operation.


Example

combine foo.txt 1.txt 2.txt 3.txt


This creates a file in the current directory named "foo.txt".  Its contents will be the combined contents of three files:  1.txt, 2.txt, and 3.txt.


Sample Output:

Combine 2.3 - File Combining Utility
Copyright (C) 2004-2010 by Greg Wittmeyer - All Rights Reserved
1.txt: ok
2.txt: ok
3.txt: ok
Combined 3 files (126 bytes)



Download

Click here to download version 2.3 of COMBINE.EXE (released 27-Aug-2010).

DELNEXT.EXE

DELNEXT.EXE will schedule one or more files or directories to be deleted during the next reboot.  This is useful for deleting files that are currently in use (and therefore locked).


Usage

DELNEXT [/d"..."] [/move"..."] [/s] [/nologo] [/now] files...



Switches:
/dThe default directory where the files are located.  If omitted, the current working directory is used.  The directory must follow the /d switch immediately (no spaces), and be surrounded in quotes.
/moveInstead of deleting, replace the target file with the specified file during the next reboot.
/sRecursively enter subdirectories.
/nologoDon't display the program banner.
/nowDelete the file immediately if possible.


Example #1

C:\dos>delnext c:\killme.ico
Gammadyne Delete At Next Reboot Utility 4.1 (delnext.exe)
Copyright (C) 2005-2010 by Greg Wittmeyer - All Rights Reserved

c:\killme.ico ... success


Example #2

C:\dos>delnext /dir"c:\windows" /s "foo bar.dll" logon.exe
Gammadyne Delete At Next Reboot Utility 4.1 (delnext.exe)
Copyright (C) 2005-2010 by Greg Wittmeyer - All Rights Reserved

c:\windows\foo bar.dll ... success
c:\windows\system32\logon.exe ... success


Example #3

C:\dos>delnext /move"c:\temp\foo.dll" c:\windows\foo.dll
Gammadyne Delete At Next Reboot Utility 4.1 (delnext.exe)
Copyright (C) 2005-2010 by Greg Wittmeyer - All Rights Reserved

c:\windows\foo.dll ... success



Notes

  • The * and ? wildcards are supported.
  • The operating system will delete the file before any drivers are loaded or services are started.  This makes DELNEXT an excellent tool for ridding a system of viruses.
  • Some viruses will detect when one of their files is missing, and restore it.  It is important to delete all of the files associated with the virus.
  • Files cannot be located on a network share because they are deleted before networking support is booted.
  • Directories must be empty in order to be deleted.
  • Deleted files are not moved to the Recycle Bin, they are permanently deleted.  For a good undelete utility, we recommend Back2Life.


Download

Click here to download version 4.1 of DELNEXT.EXE (released 27-Aug-2010).

DELS.EXE

DELS.EXE will delete a set of files from a directory and all of its subdirectories.  Only one parameter is required:  a specification of the files to be deleted.  The specification can use the ? and * wildcards.  Multiple specifications can be separated with a semi-colon.


Usage

DELS [/age##] [/nf] [/nologo] [/nr] [/ns] [/nw] [/q] [/test] filespec


Where filespec specifies the file(s) to be deleted.

Switches:
/age##Only delete files that are at least this age, in days.
/nfDon't list each file as it is deleted.
/nologoDon't display the program banner.
/nrDon't recursively enter subdirectories.
/nsDon't display the operation summary.
/nwDon't report warnings in the file specification.
/qSuppress all output.
/testTest only - no deleting.


Example

For example, Gammadyne uses this to delete all of our object code files:

dels /nf /age7 f:\projects\*.obj;*.sbr;*.res;*.bsc;*.pch;*.ncb


Sample Output:

DELS.EXE 1.9 - Recursive File Deletion Utility
Copyright (C) 2001-2010 by Greg Wittmeyer - All Rights Reserved

Deleting F:\PROJECTS\AutoTweak\AutoTweak.ncb : ok
Deleting F:\PROJECTS\Scratchboard\Scratchboard.ncb : ok
Deleting F:\PROJECTS\Gammadyne Mailer\Gammadyne Mailer.ncb : FAILED!
Deleting F:\PROJECTS\Console\Console.ncb : ok
Deleting F:\PROJECTS\All\All.ncb : ok
Deleting F:\PROJECTS\Eclient\Eclient.ncb : only 3 days old

4 files deleted successfully
1 files could not be deleted
1 files were not old enough
Total size of file specification: 34,741,983 bytes



Notes

  • We are not responsible for damage caused by the use of this program, or any other program, even if it contains bugs.  This is a powerful program with the ability to seriously screw up your computer.
  • You may press the Escape key to abort the operation once it has started.
  • When a file specification contains an absolute path, all subsequent file specifications will be relative to that path.  Note that the example above depends on this.
  • Deleted files are not moved to the Recycle Bin, they are permanently deleted.  For a good undelete utility, we recommend Back2Life.


Download

Click here to download version 1.9 of DELS.EXE (released 12-Sep-2010).

FCMP.EXE

FCMP.EXE compares two files, reporting whether or not they are the same.


Usage

FCMP [/e#] [/i#] [/n#] [/nologo] [/s] file1 file2


Compares file1 to file2, and reports if they are the same size and identical, byte for byte.

Switches:
/eEnd at specified offset.
/iStart at specified offset.
/nCompare only the specified number of characters.
/nologoDon't display the program banner.
/sSuppress all output.


Example

fcmp c:\work\foo.txt d:\work\bar.txt


Sample Output:

FCMP 2.1 - File Comparison Utility
Copyright (C) 1994-2010 by Greg Wittmeyer - All Rights Reserved

Files are identical.


Sample Output:

FCMP 2.1 - File Comparison Utility
Copyright (C) 1994-2010 by Greg Wittmeyer - All Rights Reserved

Files differ at offset 0
'2' (50) != '1' (49)



Notes

  • File offsets are 0-based.
  • The %ErrorLevel% environment variable will contain 0 if the files match, 1 if they do not, or 2 if a file could not be opened or read from.


Download

Click here to download version 2.1 of FCMP.EXE (released 27-Aug-2010).

FIREWALL.EXE

FIREWALL.EXE is a utility for adding exceptions to the Windows Firewall.


Usage

FIREWALL [/aa] [/ad] [/nologo] [/pa] [/pd] [/q] [/s] [/udp] app/port [name]


Parameters:
app/portThe filepath to the application's executable, or the port number.
nameName of the application as it appears in the firewall manager.

Switches:
/aaAdd an application exception.
/adDiscard an application exception.
/paAdd an port exception.
/pdDiscard a port exception.
/nologoDon't display the program banner.
/sReport the firewall's status.
/qSuppress all output.
/udpFor port exceptions, allow the UDP protocol instead of TCP.


Example, adding an application exception

firewall /aa c:\work\foo.exe "Acme Utility"


Example, discarding an application exception

firewall /ad c:\work\foo.exe


Example, adding a port exception

firewall /pa 14337 "Acme Utility"


Example, discarding a port exception

firewall /pd 14337



Notes

  • firewall.exe must have admin rights to manipulate the firewall.
  • This utility does not work with other firewalls, only the one built into Windows.


Download

Click here to download version 1.1 of FIREWALL.EXE (released 27-Aug-2010).

GPATCH.EXE

GPATCH.EXE will alter a block of bytes in a file.


Usage

First, specify the directory and filename of the file that is to be patched.  Then, specify the /i switch, followed immediately by the 0-based index of where the data should be stored in the file.  The actual data can be specified one of two ways:
  • The /s switch, immediately followed by the data, inside quotes.  The data is expressed literally.
  • The /h switch, immediately followed by a string of hexadecimal pairs, inside quotes.  Each hexadecimal pair corresponds to a single byte of data.  Each pair can be separated by spaces, commas, dashes, or nothing at all.

In addition, you may optionally specify the /n switch, immediately followed by the number of bytes that is to be deleted at the specified index before the data is inserted at the index.  If this switch is omitted, this defaults to the length of the data, which has the end result of overwriting a section of the file without modifying its size.  If the /n value is less than the length of data, the file will grow.  Likewise, if the /n value is more, the file will shrink.  If /n0 is specified, the data is effectively inserted into the file at the index.


Notes

  • To append the data to the file, specify the /a switch instead of /i.
  • You may specify multiple /s and /h switches.  The final data will be the concatenation of the data specified by each switch.
  • Multiple files can be patched at the same time.  Either list each file, separated by semi-colons.  Or, use the * or ? wildcard.
  • The /r switch will recursively enter sub-directories looking for filename matches.
  • The /nologo switch will omit the program banner.
  • The /nw switch will suppress warnings in the file specification (such as "File does not exist").


Example #1: Changing the 3rd, 4th, and 5th bytes to "abc".

c:\dos>gpatch f:\g\killme.txt /i2 /s"abc"
GPATCH 2.1 - File Patching Utility
Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved

Replaced 3 bytes at index 2 in file "f:\g\killme.txt" with "abc"


Example #2: Inserting "abc" at the beginning.

c:\dos>gpatch f:\g\killme.txt /i0 /n0 /h"6162 63"
GPATCH 2.1 - File Patching Utility
Copyright (C) 2002-20010 By Greg Wittmeyer - All Rights Reserved

Replaced 0 bytes at index 0 in file "f:\g\killme.txt" with "abc"


Example #3: Appending "abc" to the end.

c:\dos>gpatch f:\g\killme.txt /a /s"abc"
GPATCH 2.1 - File Patching Utility
Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved

Replaced 0 bytes at index 4 in file "f:\g\killme.txt" with "abc"


Example #4: Deleteing the first 100 bytes.

c:\dos>gpatch f:\g\killme.txt /i0 /n100 /s""
GPATCH 2.1 - File Patching Utility
Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved

Replaced 100 bytes at index 0 in file "f:\g\killme.txt" with ""


Example #5: Patching multiple files.

c:\dos>gpatch f:\g\foo?.txt;bar.txt /i0 /n100 /s"abc"
GPATCH 2.1 - File Patching Utility
Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved

Replaced 100 bytes at index 0 in file "f:\g\foo1.txt" with "abc"
Replaced 100 bytes at index 0 in file "f:\g\foo2.txt" with "abc"
Replaced 100 bytes at index 0 in file "f:\g\bar.txt" with "abc"


Download

Click here to download GPATCH.EXE version 2.1 (released 27-Aug-2010).

GS.EXE

GS.EXE is an alternative DOS shell, with improved editing features, command history, and support for Aero Glass.


Key Features

  • Pressing the left arrow key does not perform a backspace, it lets you go back and change something without destroying everything that came after it.
  • Pressing the up and down arrow keys will cycle through a history of past commands (including commands from a previous session).
  • Pressing the insert key will toggle the editing mode between "insert" and "overwrite".
  • Ctrl+V will paste the clipboard into the command line.
  • Pressing F7 will display the command history.  You can choose a command and press Enter to run it again, or Escape to cancel.
  • Pressing Ctrl+Left or Ctrl+Right will move to the previous/next word on the command line.
  • If the "cd" command cannot find the directory, the user will be presented with a list of directories that have a similar name or that have the same prefix.  The user can then select one of these suggestions.


Configuration

The configuration file fo GS.EXE is GS.INI.  This file is created the first time that GS runs.  Following is a description of each setting in GS.INI.

Section.EntryDefaultDescription
Colors.CurrentPath15Color of the prompt (which is the current path and ">").
Colors.CommandLine14Color of the command line entered by the user.
Colors.Hilite206Color of the currently selected directory (when the user is presented with a list).
Colors.ExitCode11Color of the process exit code (when ReportStatus is 1).
Options.ReportStatus0If 1, the exit code of a process is reported after it finishes.
Options.Glass0If 1, the entire background will use the Aero Glass effect. Requires Vista or later.
Options.NoHistory0If 1, the command history is not recorded between sessions. 
Options.Transparency0The transparency of the console window (from 0 to 255, where 0 is completely opaque).  Please note that if Glass is enabled, this transparency is additive to the transparency that is inherent with Glass.  Unfortunately it is not possible to reduce the transparency of Glass.


Color Codes

A color code is formed by adding a foreground color value to a background color value.

ColorForegroundBackground
Black00
Dark Blue116
Dark Green232
Dark Cyan348
Dark Red464
Dark Magenta580
Dark Yellow696
Light Gray7112
Dark Gray8128
Blue9144
Green10160
Cyan11176
Red12192
Magenta13208
Yellow14224
White15240

For example, if you want yellow text on a blue background, the color code would be 14 + 144 = 158.


Download

Click here to download version 6.0 of GS.EXE (released 29-Jul-2011).

NUMLINES.EXE

NUMLINES.EXE will count the number of lines in a set of plain text files.  It will also count the number of non-blank, non-comment lines (assumes comments are in C++ style).


Usage

numlines [/i] [/nologo] [/s] filespec


Where filespec is a specification of the files whose lines are to be counted.  The specification can use the ? and * wildcards.  Multiple specifications can be separated with a semi-colon.

Switches:
/iList each individual file.
/nologoSuppress program banner.
/sRecursively search subdirectories.


Example

c:\>numlines c:\work\*.h;*.cpp
NUMLINES 3.1 - Source Code Line Counter
Copyright (C) 1998-2010 by Greg Wittmeyer - All Rights Reserved

Total files: 588
Total lines: 581,818
Total uncommented, non-blank lines: 353,663 (60.8%)
Total blank lines: 111,560 (19.2%)
Total commented lines: 116,595 (20.0%)
Total semi-colons: 224,739
Total bytes: 14,779,107
Average lines per file: 989
Average bytes per file: 25,134
Average bytes per line: 25.4
Report date: 8/27/2010 1:34:08 p.m.



Outputting to a File

The output can be redirected with the > operator, like this:

numlines c:\work\*.txt > c:\foo\count.txt



Commentary

The number of lines of code is a poor indicator of the quantity and quality of a programmer's work.  In fact, a programmer's skill is inversely proportional to the number of lines of code used to solve a problem.  Bad programmers often copy blocks of repetitive code instead of eliminating the repetition with functions.


Download

Click here to download version 3.1 of NUMLINES.EXE (released 27-Aug-2010).

PECHKSUM.EXE

PECHKSUM.EXE reports or updates the checksum of a Portable Executable (PE) file, which includes Windows executables and DLL's.


Usage

PECHKSUM [/nologo] [/q] [/r] filespec


Switches:
/nologoDon't display the program banner.
/qQuiet mode - suppress all output.
/rReport existing checksum only - do not update checksum.


Example

pechksum c:\work\foo.exe


Sample Output:

PEChkSum 1.2 - Portable Executable Checksum Utility
Copyright (C) 2009-2010 by Greg Wittmeyer - All Rights Reserved

C:\work\foo.exe : OK
  Old checksum: 0 (0x00000000)
  New checksum: 1881027 (0x001CB3C3)



Notes

  • The file specification can utilize the asterisk and question mark wildcards.  Multiple files can be specified by separating them with a semi-colon.
  • The %ErrorLevel% environment variable will contain 0 on success, 1-99 for parameter error, or 100 for failure.


Download

Click here to download version 1.2 of PECHKSUM.EXE (released 27-Aug-2010).

SIZEOF.EXE

SIZEOF.EXE reports the total size of a set of files in bytes, kilobytes, and megabytes.


Usage

sizeof [/e exclusion] [/f] [/logo] [/r#] [/s] [/w] filespec


Where filespec is a specification of the files whose sizes are to be counted.  The specification can use the ? and * wildcards.  Multiple specifications can be separated with a semi-colon.

Switches:
/eExclude files that follow.
/fList each file.
/logoDisplay the program banner.
/r#Return the total size as the process exit code (%errorlevel%). 0=bytes, 1=KB, 2=MB.
/sRecursively search subdirectories.
/wSuppress warnings in the file specification.


Example

sizeof /logo /s c:\work\*.cpp;*.h /w /e test.*


Sample Output:

SizeOf 2.6 - File Size Reporting Utility
Copyright (C) 2000-2011 by Greg Wittmeyer - All Rights Reserved

Total bytes: 10,219,404 (9979.89 KB) (9.75 MB)
Total files: 236   Average size: 43,302 bytes
Smallest: 238 bytes   Largest: 1,053,545 bytes



Download

Click here to download version 2.6 of SIZEOF.EXE (released 07-Mar-2011).

SLEEP.EXE

SLEEP.EXE will make the computer enter a power-saving state.  Pressing any key will bring the computer back to normal operation.

By default, SLEEP.EXE makes the computer enter "suspend" mode.  The state of the operating system is stored in RAM, which will remain powered.  The advantage to this mode is that the computer can be woken up quickly.

SLEEP.EXE can also make the computer enter "hibernate" mode by specifying the /h switch.  The state of the operating system is stored on the hard drive.  The computer will take much longer to wake up than "suspend" mode, but because there is no need to power the RAM, almost no electricity is used.


Usage

SLEEP [/f] [/h] [/nologo] [/ns] [/r]


Switches:
/fForce the computer to sleep.  Otherwise, any running application will be able to prevent the computer from sleeping if it so chooses.
/hHibernate instead of suspending.  Hibernation must be enabled in Control Panel > Power Options > Hibernate tab.
/nologoSuppress the title banner.
/nsPrevent entering sleep mode.  The power status will still be reported.
/rReboot instead of suspending.


Example

c:\dos>sleep
Gammadyne Power Management Utility 2.1 (sleep.exe)
Copyright (C) 2000-2010 by Greg Wittmeyer, All Rights Reserved

AC Line Status: Online
Battery charge: No Battery
Entering sleep mode...ok



Notes

  • SLEEP.EXE uses the SetSystemPowerState API function in Kernel32.dll.
  • SLEEP.EXE works on Windows 98/ME/2000/XP/2003/Vista/2008/7.  It does not work on NT through version 4.0.
  • The computer must have power management capabilities (most do).  Make sure that power management is enabled in the BIOS and in Control Panel, Power Options.


Download

Click here to download version 2.1 of SLEEP.EXE (released 27-Aug-2010).

STARTAS.EXE

STARTAS.EXE will execute a DOS command line under a different user account.


Usage

STARTAS [/dir"..."] [/hide] [/profile] [/max] [/min] user password cmdline...


Switches:
/dirSet the current working directory for the process.
/hideThe process's window should be initially hidden.
/profileLoad the user's HKEY_USERS registry key.
/maxThe process's window should be initially maximized.
/minThe process's window should be initially minimized.


Example

startas /dir"c:\foo" /profile Gandalf Belloch copy foo.txt bar.txt



Notes

  • The user name can optionally be in the form of "user@domain".
  • Everything after the password is considered the command line to be launched.  Do not enclose the command line in quotes.
  • The command line is executed in a separate console window.


Download

Click here to download version 1.2 of STARTAS.EXE (released 27-Aug-2010).

TIMER.EXE

TIMER.EXE is used to measure the length of time that other command line operations take to finish.  When executed with no parameters, the timer is started.  If the "/s" switch is specified, the elapsed time is output to the console.


Usage

TIMER [/nologo] [/s]


Switches:
/etWhen stopping the timer, display the current date and time.
/nDisplay the elapsed time numerically (e.g. hh:mm:ss.uu)
/nologoSuppress the title banner.
/qQuiet mode - do not report current time when starting timer.
/sStop timer and report elapsed time.


Example

c:\dos>timer
Timer 2.1 - Copyright (C) 2007-2010 by Greg Wittmeyer - All Rights Reserved
Timer started: 8/27/2010 2:27:17 p.m.
c:\dos>timer /s /nologo
4.5 seconds



Notes

  • The file TIMER.TXT is used to record the time that the timer started.  This file is created in the same directory as TIMER.EXE.
  • Each call to TIMER.EXE without the /s switch should be balanced by one call with the /s switch.  Nesting is supported.


Download

Click here to download version 2.1 of TIMER.EXE (released 12-Sep-2010).

WOL.EXE

WOL.EXE is a utility that turns on a computer remotely.  It broadcasts a "Wake On LAN" packet to the Network Interface Card (NIC) with the specified MAC address.  The MAC address may optionally be followed by the IP address of the network adapter that should broadcast the packet.  A port number can also be specified, although this is rarely necessary.


Example

wol 5c9d32b5f287


Example

wol 5c9d32b5f287 192.168.0.1


Example

wol 5C9D32B5F287 192.168.0.1 16962



Notes

  • The motherboard must support Wake On LAN.
  • The NIC must support Wake On LAN.
  • For add-on network cards, there must be a wire connecting the motherboard's WOL port to the NIC's WOL port.
  • The Wake On LAN feature must be enabled in the motherboard's BIOS.
  • The "Good Connection" light on the back of the NIC must be lit when the machine is off.
  • Port 12287 (0x2FFF) must be open, however we've never seen Windows block this port.
  • Packets cannot be broadcast across the Internet.  That's why they call it Wake On Lan, not Wake On Internet.
  • To find your MAC address, run the MSINFO32.EXE tool that is part of Windows.  Navigate to Components > Network > Adapter.


Source Code

Want the C++ source code?  Donate $15 or more and we will happily provide the source code.  After the donation is processed, please contact us and let us know that you want it.


Download

Click here to download version 1.7 of WOL.EXE (released 14-Jun-2011).