Главная страница
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.029 c
2-1195674013
WFS
2007-11-21 22:40
2007.12.16
Вопрос про формулы


15-1194979068
Andrey_rus
2007-11-13 21:37
2007.12.16
Программа для определения загрузки процессора


2-1195310612
datorn
2007-11-17 17:43
2007.12.16
wm_gettext


2-1195592375
099999
2007-11-20 23:59
2007.12.16
Какой это цвет?


2-1195557399
Dennis I. Komarov
2007-11-20 14:16
2007.12.16
Забыл :(