DI Management Home > Utilities > Setting up a BIN directory for Windows executables

Setting up a BIN directory for Windows executables


On Linux systems there is a /bin folder containing executable files accessible by all users from any directory. We find it really useful to set up a similar C:\Bin directory on our Windows systems to keep all the miscellaneous executable files (.EXE, .BAT) we use frequently.

Here are instructions on how to do it.

Procedure

  1. Create a directory C:\Bin
    mkdir C:\Bin
    
  2. Add this directory to your PATH variable. We prefer to have it first in the list. See Setting the PATH variable below.
    PATH=C:\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;...
    
  3. Copy your executable programs to this directory.
    C:\Bin
        base64.exe
        digestvalue.exe
        dumpasn1.exe
        hexdump.exe
        MySecret.exe
        sha1sum.exe
        sha256sum.exe
        ...
    
You can then run any of these executables from the command line.
> sha1sum abc.txt
a9993e364706816aba3e25717850c26c9cd0d89d *abc.txt

Setting the PATH variable

We want to add C:\Bin to our computer's PATH variable. Note that MS continually changes how to do this. Here are instructions that worked for us using Windows 10 version 20H2.

  1. ⊞ Win + X > System > (scroll down) Advanced System Settings
  2. Click on the Enviroment Variables button
  3. Under System Variables select Path and click the Edit... button.
  4. Click New and enter C:\Bin then keep clicking the Move Up button until C:\Bin is at the top of the list.
  5. Click OK to finish.

Enviroment variables Edit enviroment variable

See also Windows Path Variable

Useful utilities

Put any or all of our Utilities for Windows in your C:\Bin directory:

Contact us

To contact us or comment on this page, please send us a message.

This page first published 28 June 2021. Last updated 3 November 2023