• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part III: Appendixes > Batch File Argument and for Variable Replacement

Batch File Argument and for Variable Replacement

The expressions listed in Table D.2 expand into batch file command-line arguments and for command variables. In the expressions, n is an argument number or the letter corresponding to a for command variable.

Table D.2. Argument and for Variable Replacement and Editing
Expression Result
%n Argument or variable n.
%~n Removes surrounding quotes (").
%~fn Fully qualified path name.
%~dn Drive letter only.
%~pn Path only.
%~nn File name only.
%~xn File extension only.
%~sn Short DOS 8.3 file and path.
%~an File attributes.
%~tn Modification date/time of file.
%~zn Length of file in bytes.
%~$PATH:n Fully qualified name of first matching file when searching the PATH. If no file is found, the result is a zero-length string. The filename must include the proper extension; PATHEXT is not used.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint