Examples

For the following examples, the actual base filename for the modifiers is: C:\Freescale\my demo\TheWholeThing.myExt.

%p gives the path only with a file separator:

  C:\Freescale\my demo\
  
  

%N results in the filename in 8.3 format (that is, the name with only eight characters):

  TheWhole
  
  

%n returns just the filename without extension:

  TheWholeThing
  
  

%E gives the extension in 8.3 format (that is, the extension with only three characters)

  myE
  
  

%e is used for the whole extension:

  myExt
  
  

%f gives the path plus the filename:

  C:\Freescale\my demo\TheWholeThing
  
  

Because the path contains a space, using %" or %' is recommended: Thus, %"%f%" results in: (using double quotes)

  "C:\Freescale\my demo\TheWholeThing"
  
  

where %'%f%' results in: (using single quotes)

  `C:\Freescale\my demo\TheWholeThing'
  
  

%(envVariable) uses an environment variable. A file separator following after %(envVariable) is ignored if the environment variable is empty or does not exist. In other words, if TEXTPATH is set to: TEXTPATH=C:\Freescale\txt, %(TEXTPATH)\myfile.txt is replaced with:

  C:\Freescale\txt\myfile.txt
  
  

But if TEXTPATH does not exist or is empty, %(TEXTPATH)\myfile.txt is set to:

  myfile.txt
  
  

A %% may be used to print a percent sign. Using %e%% results in:

  myExt%