Если тема еще актуальна, то записать его в кратком формате DOS.
The GetShortPathName function retrieves the short path form of the specified path.
DWORD GetShortPathName(
LPCTSTR lpszLongPath,
LPTSTR lpszShortPath,
DWORD cchBuffer
);
ParameterslpszLongPath [in] Pointer to a null-terminated path string. The function retrieves the short form of this path.
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File.
Windows Me/98/95: This string must not exceed MAX_PATH characters.
lpszShortPath [out] Pointer to a buffer to receive the null-terminated short form of the path specified by lpszLongPath.
cchBuffer [in] Size of the buffer pointed to by lpszShortPath, in TCHARs.
Return ValuesIf the function succeeds, the return value is the length, in
TCHARs, of the string copied to
lpszShortPath, not including the terminating null character.
If the
lpszShortPath buffer is too small to contain the path, the return value is the size of the buffer, in
TCHARs, required to hold the path. Therefore, if the return value is greater than
cchBuffer, call the function again with a buffer that is large enough to hold the path.
If the function fails for any other reason, the return value is zero. To get extended error information, call
GetLastError.
RemarksWhen an application calls this function and specifies a path on a volume that does not support 8.3 aliases, the function fails with ERROR_INVALID_PARAMETER if the path is longer than 67 bytes.
The path specified by
lpszLongPath does not have to be a full or a long path. The short form may be longer than the specified path.
If the specified path is already in its short form, there is no need for any conversion, and the function simply copies the specified path to the buffer for the short path.
You can set
lpszShortPath to the same value as
lpszLongPath; in other words, you can set the buffer for the short path to the address of the input path string.
You can obtain the long name of a file from the short name by calling the
GetLongPathName function. Alternatively, where
GetLongPathName is not available, you can call
FindFirstFile on each component of the path to get the corresponding long name.