UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:shlwapi.PathUndecorateW |
PathUndecorateW function (shlwapi.h) |
Removes the decoration from a path string. (Unicode) |
|
shell\PathUndecorate.htm |
shell |
2d98ad60-8a7d-4b8d-9b5c-27e348bdc2c3 |
12/05/2018 |
PathUndecorate, PathUndecorate function [Windows Shell], PathUndecorateA, PathUndecorateW, _win32_PathUndecorate, shell.PathUndecorate, shlwapi/PathUndecorate, shlwapi/PathUndecorateA, shlwapi/PathUndecorateW |
shlwapi.h |
Windows |
Windows 2000 Professional, Windows XP [desktop apps only] |
Windows 2000 Server [desktop apps only] |
PathUndecorateW (Unicode) and PathUndecorateA (ANSI) |
Shlwapi.lib |
Shlwapi.dll (version 5.0 or later) |
Windows |
19H1 |
|
|
|
|
|
|
Removes the decoration from a path string.
Type: LPTSTR
A null-terminated string of length MAX_PATH that contains the path. When the function returns, pszPath points to the undecorated string.
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.
The following table illustrates how strings are modified by PathUndecorate.
Initial String | Undecorated String |
---|---|
C:\Path\File[5].txt | C:\Path\File.txt |
C:\Path\File[12] | C:\Path\File |
C:\Path\File.txt | C:\Path\File.txt |
C:\Path\[3].txt | C:\Path\[3].txt |
Note
The shlwapi.h header defines PathUndecorate as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.