Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.12.16;
Скачать: CL | DM;

Вниз

Long file path   Найти похожие ветки 

 
bns   (2007-05-31 12:13) [0]

Здравствуйте,

мне надо скопировать на диск файл, его имя вместе с путем (около 300 символов) больше, чем MAX_PATH. Я это сделал с помощью Unicode версии CreateFileW. Теперь этот файл и все директории из его пути лежат на диске. Но открыть его и посмотреть содержимое не удается ничем. Более того, стандартный Explorer отказался его удалять (кстати, без каких-либо сообщений об ошибке).

Есть ли у кого-нибудь идеи или опыт, как открыть/удалить такой файл?

Спасибо.


 
DiamondShark ©   (2007-05-31 15:49) [1]

Как вариант, удалить из командной строки, используя короткие имена.

а вообще-то,

Maximum Path Length
In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A path is structured as follows: drive letter, colon, backslash, components separated by backslashes, and a null-terminating character. For example, the maximum path on the D drive is D:\<256 chars>NUL.

The Unicode versions of several functions permit a maximum path length of 32,767 characters, composed of components up to 255 characters in length. To specify such a path, use the "\\?\" prefix. For example, "\\?\D:\<path>". To specify such a UNC path, use the "\\?\UNC\" prefix. For example, "\\?\UNC\<server>\<share>". Note that these prefixes are not used as part of the path itself. They indicate that the path should be passed to the system with minimal modification. An implication of this is that you cannot use forward slashes to represent path separators or a period to represent the current directory.

When using the API to create a directory, the specified path cannot be so long that you could not append an 8.3 file name.

Note that the shell and the file system may have different requirements. It may be possible to create a path with the API that the shell UI cannot handle.

Функция DeleteFileW поддерживает \\?\ имена.



Страницы: 1 вся ветка

Текущий архив: 2007.12.16;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.026 c
15-1195208295
Асм
2007-11-16 13:18
2007.12.16
студия для асма


15-1195306015
БарЛог
2007-11-17 16:26
2007.12.16
Подскажите программу для бэкапа ОС


15-1194926298
MBo
2007-11-13 06:58
2007.12.16
Охранять надо интеллектуальную собственность...


4-1180449898
CRACKISH
2007-05-29 18:44
2007.12.16
Обнаружение запуска процесса


15-1195058193
VmR
2007-11-14 19:36
2007.12.16
По какому принципу изменяют версию программы