Command Prompt for Windows




Enhanced Batch Commands

Enhanced Batch commands are commands that have been added to the WinOne® Command Prompt to make batch files more powerful and easier to write. They include :-

  • ASK
  • Ask a yes/no question and set the errorlevel respectively.
  • BEEP
  • Send a beep to the system speaker.
  • BOX
  • Display a box in one of four pre-defined formats.
  • CALC
  • Perform basic arithmetic calculations in a batch file.
  • CALLPROC
  • Call a procedure with in a Batch file.
  • CHARNEXT
  • Determine the number of code-points in the first character of a string.
  • CHARPREV
  • Determine the number of code-points in the last character of a string.
  • COLOUR
  • Change foreground and background screen colours.
  • COG
  • Get a value from a COM object property.
  • COM
  • Call a COM object method.
  • COMMA
  • Insert commas into a number.
  • COP
  • Put a value into a COM object property.
  • DATA
  • Clear or add items to a global list
  • DATE2SER
  • Convert a date to a serial date value.
  • DIRS
  • Display the directory stack.
  • DISKFREE
  • Determine the amount of free disk space for a disk drive.
  • DISKUSED
  • Determine the amount of used disk space for a disk drive.
  • DO
  • Conditionally perform a command one or more times.
  • END
  • End a batch file.
  • ENDPROC
  • End a procedure.
  • ENUMREG
  • Enumerate all the keys in the System Registry for the specified hkey.
  • FILEDATE
  • Get the last modified date of a file.
  • FILESIZE
  • Get the size in bytes of a file.
  • FILETIME
  • Get the last modified time of a file.
  • FILETYPE
  • Determine whether a file contains text or binary data.
  • GETINI
  • Get an initialisation file key value or enumerate all the key names.
  • GETKEY
  • Wait for a single keypress from the user.
  • GETNUM
  • Wait for a sequence of keypresses from the user.
  • GETSTR
  • Wait for a sequence of keypresses from the user.
  • GETREG
  • Get a System Registry value or enumerate all the names for a hkey.
  • GOSUB
  • Jump to another part of a batch file and then return.
  • LET
  • Evaluate an expression and set an environment variable with the result.
  • LOCATE
  • Position the cursor anywhere on the screen.
  • LOWER
  • Convert a text string to lower case.
  • PARSE
  • Allows a sentence to be broken into pieces.
  • PLAY
  • Play a wave sound file.
  • POPD
  • Pop a directory from the stack and make it the current directory.
  • PROC
  • Start a procedure.
  • PUSHD
  • Push the current directory onto the stack and change to a new directory.
  • READ
  • Read the next item from the global list.
  • READLN
  • Read a line of text from a file.
  • RETURN
  • Return execution to the next command following the GOSUB command.
  • SAY
  • Display a message with out a carriage return - line feed.
  • SEED
  • Randomise the random number generator.
  • SER2DATE
  • Convert a serial date value to a date.
  • SETINI
  • Set or delete an initialisation file key value.
  • SETREG
  • Set or delete a System Registry value.
  • SLEEP
  • Do nothing for a time.
  • STOP
  • Stop processing a batch file and return to previous batch file.
  • STRFIND
  • Find the first occurrence of a string within the specified text.
  • STRFOLD
  • Normalize or fold a Unicode string as specified.
  • STRPAD
  • Pad a text string with space characters.
  • STRREP
  • Replace all occurrences of a string within text with another string.
  • STRREV
  • Reverse all the characters in a text string.
  • STRRFIND
  • Find the last occurrence of a string within the specified text.
  • STRSIZE
  • Determine the length of a string.
  • STRSPLIT
  • Split a string at the specified position.
  • STRTRIM
  • Remove leading and trailing space characters from a text string.
  • SUBSTR
  • Extract a section of text from a text string.
  • UNTIL
  • Conditionally perform a command zero or more times.
  • UPPER
  • Convert a text string to upper case.
  • WHILE
  • Conditionally perform a command zero or more times.