[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FNSTRIP

  .  Summary

  fnstrip(str <filename>, int <specifier>, str <target>);

  .  Description

  The fnstrip function allows specific parts of a filename to be ex-
  tracted. In the MS-DOS operating system, a filename can consist of
  up to four parts, the drive, the path, the name, and the extension
  (e.g., C:\TELIX\TELIX.FON). fnstrip processes the filename specified
  in <filename>, and depending on the value of <specifier>, places any
  combination of these four parts in the <target> string. Legal values
  for <specifier> and their results are as follows:

       <specifier>    Filename portion copied

            0         Full file name
            1         All except the drive
            2         Drive, name, and extension
            3         Name and extension
            4         Drive, path, and name (no extension)
            5         Path and name (no extension)
            6         Drive and name (no extension)
            7         Name only (no extension)
            12        Drive and path only
            13        Path only
            14        Drive only

  .  Return Value

  None.

  .  Example

  str filename[64], shortname[16];
  gets(filename, 64);                 // ask for a filename
  fnstrip(filename, 3, shortname);    // keep only name & extension

See Also: filefind
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson