PathRenameExtensionPathRenameExtension*
*



Contents  *



Index  *Topic Contents
*Previous Topic: PathRemoveFileSpec
*Next Topic: PathSearchAndQualify

PathRenameExtension


BOOL PathRenameExtension(
    LPTSTR pszPath,
    LPCTSTR pszExt
);

Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string.

pszPath
Address of the path for which to replace the extension. This buffer must be at least MAX_PATH characters in size.
pszExt
Address of a character buffer that contains a '.' followed by the new extension.

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.