Pages

Tuesday, July 21, 2015

Dhil IT techno: Windows CMD Shell Command Line Syntax

Windows CMD Shell Command Line Syntax

   Parameters    Command Line Parameters  %1  %~f1 
   Env. Variables Create/read environment variables.
   Redirection   Spooling output to a file, piping input.
   AND/OR Logic  Conditional Execution (If-Then-Else)
   Loops         Loops and Subroutines.
   functions     How to package blocks of code.
   Macros        Embed blocks of code in a variable.
servicesServices      List of Windows XP Services

Evaluating expressions
   Using brackets to Group and expand expressions.
   Delayed Expansion Variables within loops.
   Escape chars, delimiters and quotes
   SET /A        Environment variable arithmetic.
   VarSubstring  Extract part of a variable (substring)
   VarSearch     Search & replace part of a variable.
   RANDOM        Random Numbers.
   Wildcards     Match multiple files.

Batch Files
   Run a script  How to run a script.
   DateMath      Add or subtract days from any date.
   GetDate.cmd   Get todays date (any region, any OS.)
   GetTime.cmd   Get the time now.
   GetGMT.cmd    Time adjusted to Greenwich Mean Time.
   DeQuote       Remove quotes from a string.
   DelOlder      Delete files more than n days old.
   StampMe.cmd   Rename a file with the date/time.
   tdiff.cmd     Time difference in Hours/Minutes.
   Which.cmd     Display full path to any command.
   xlong.cmd     Find filenames that exceed the 256 char pathname limit.
   DragDrop.cmd  Drag and drop onto a batch script.

Reference/How to
   Autoexec       Run commands at startup.
   Slow Browsing  Speed up network browsing.
   Desktop Heap   Memory configuration.
   Long Filenames NTFS filename issues.
   Display DPI    Monitor size settings.
   CMD Internal   Commands that are Internal to the CMD shell.
   Keyboard       CMD Keyboard shortcuts.
   NoDrives       Hide mapped drives from Windows Explorer
   Printing       Printer connections and print drivers.
   Recovery       The Recovery Console.
   RUN commands   Start | Run commands.
   ProfileFolders Location of User profile folders (XP/Vista/Windows 7).
   Registry       User interface settings (XP)
   BuiltIn Groups Built-In Users and Security Groups.
   Groups         Local Domain groups, Global and Universal groups.
   64Bit          Detect 64 bit vs 32 bit Windows.