2>&1: —— 2>&1 redirects output going to file-handle 2 (stderr) to file handle 1 (stdout), so that stderr and stdout combine into a single redirectable output stream.
http://command-line-programming.suite101.com/article.cfm/batch_file_parameter_modifiers Parameter expansion is the term used to specify what the command processor (Windows or MS-DOS command line environment) does when it retrieves the parameter accessed by one of the built-in variables %0-%9. List of Modifiers The most commonly used modifiers are: %~ – takes the parameter and removes any quotation marks %~f – takes the parameter and makes a filename out of it, assuming the file exists %~$PATH: – searches the PATH variable, to locate the file (as in %~f$PATH:1) %~s – use short file names only %~a – retrieves the attributes %~t – retrieves the date and time […]