Condividi tramite


Filename-Parts Syntax

Filename-parts syntax in commands represents components of the first dependent filename (which may be an implied dependent). Filename components are the file's drive, path, base name, and extension as specified, not as it exists on disk. Use %s to represent the complete filename. Use %|[parts]F (a vertical bar character follows the percent symbol) to represent parts of the filename, where parts can be zero or more of the following letters, in any order.

Letter

Description

No letter

Complete name (same as %s)

d

Drive

p

Path

f

File base name

e

File extension

For example, if the filename is c:\prog.exe:

  • %s will be c:\prog.exe

  • %|F will be c:\prog.exe

  • %|dF will be c

  • %|pF will be c:\

  • %|fF will be prog

  • %|eF will be exe

See Also

Concepts

Commands in a Makefile