Skip to content

hollasch/win-scripts

Repository files navigation

Useful Windows Command Shell Scripts

This is a collection of Windows command shell (.cmd) scripts that I find useful.

Scripts

  • admin -- Execute command as administrator
  • batch-lf-fail -- Illustrates how cmd files may fail if they have LF line endings
  • clip-edit -- Invoke %EDITOR% to place content on the clipboard
  • envgui -- Launch the Windows environment variable GUI
  • get-tempfile -- Creates a temporary file (or directory) name for command scripts
  • pathlist.py -- Pretty report of current path list, noting non-existent and duplicate entries
  • pdfcat -- Concatenates multiple PDF files into one
  • sleep -- One-liner simple sleep (in seconds)
  • touch -- Creates/updates the timestamp of a given file
  • upsearch -- Locate nearest target file upwards from current working directory
  • vmove -- Batch move/rename utility using the preferred %EDITOR%

Snippets

  • admin-launch.cmd -- Demonstrates how to auto-relaunch a script with admin priviledges
  • failexit.cmd -- How to properly exit a CMD script with a non-zero exit code & ERRORLEVEL

Steve Hollasch
steve@hollasch.net
https://github.com/hollasch