Programmer's WorkBench (pwb.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Filename-Parts Syntax
                                             Up Contents Index Back
─────Programmer's WorkBench─────────────────────────────────────────────────
 
     The Filename-Parts Syntax is used by PWB to pass the name of the
     current file to external programs or operating-system commands. The
     letters in this syntax are case sensitive.
 
     Syntax
 
     %%   A literal percent sign (%).
 
     %s   The fully qualified path of the current file.
 
          If the current file is a pseudofile, %s specifies the name of
          a temporary disk file created for the external command to
          operate on. The temporary file is destroyed before returning
          to PWB and is never accessible to the editor.
          See: Pseudofile
 
     %|[d][p][f][e]F
          Parts of the current filename.
 
          The parts of the name are drive (d), path (p), base name (f),
          and extension (e). If the current file is a disk file named
          'c:\scratch\test.txt' or the "<COMPILE>Build Results"
          pseudofile, the given syntax yields:
 
          Syntax    Disk File               Pseudofile
          ─────────────────────────────────────────────────────
          %|F       c:\scratch\test.txt     <COMPILE>
          %|dF      c:
          %|pF      \scratch
          %|fF      test                    <COMPILE>
          %|eF      .txt
          %|pfF     \scratch\test           <COMPILE>
          %s        c:\scratch\test.txt     c:\tmp\PWB00031.r00
          %%        %                       %
 
          The title of a pseudofile cannot be specified with the %|F
          syntax, but it is accessible to macros by using the Curfile
          predefined macro.
          See: Curfile, Pseudofile
 
     WARNING: The %|F syntax specifies the name of the current file. For
              the command specified in the Readonly switch, this may not
              be the desired file. Use %s for the Readonly switch.
 
     See
 
     Readonly, Printcmd, Pseudofile
     File menu, Print
     Run menu, Customize Run Menu
     Run menu, Run DOS Command
     User Switch
                                    -♦-