Batch file Programming/Scripting

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

%~z – retrieves the size

%~d – expands to a drive letter

http://www.robvanderwoude.com/parameters.php

^ character is a command to concatenate commands split into multiple lines

Leave a Reply

Your email address will not be published. Required fields are marked *