Export (0) Print
Expand All

PathUndecorate function

Removes the decoration from a path string.

Syntax


void PathUndecorate(
  _Inout_  LPTSTR pszPath
);

Parameters

pszPath [in, out]

Type: LPTSTR

A null-terminated string of length MAX_PATH that contains the path. When the function returns, pszPath points to the undecorated string.

Return value

This function does not return a value.

Remarks

A decoration consists of a pair of square brackets with one or more digits in between, inserted immediately after the base name and before the file name extension.

Examples

The following table illustrates how strings are modified by PathUndecorate.

Initial StringUndecorated String
C:\Path\File[5].txtC:\Path\File.txt
C:\Path\File[12]C:\Path\File
C:\Path\File.txtC:\Path\File.txt
C:\Path\[3].txtC:\Path\[3].txt

 

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

PathUndecorateW (Unicode) and PathUndecorateA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft