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

Вниз

Как при копировании заменять файл?   Найти похожие ветки 

 
Intell ©   (2003-05-27 16:12) [0]

Я копирую файлы так:
CopyFile("C:\Netlog.txt", "C:\2.txt", true);
но почему-то если такой файл уже существует, то он не заменяется.


 
Anatoly Podgoretsky ©   (2003-05-27 16:15) [1]

Потому что ты ему так сказал, этим управляет третий параметр


 
Skier ©   (2003-05-27 16:16) [2]

Помощь читаем ? Или всё кодируем ?

BOOL CopyFile(

LPCTSTR lpExistingFileName, // pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);


bFailIfExists

Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.


 
VAleksey ©   (2003-05-27 16:36) [3]


> Skier © (27.05.03 16:16)

+
Еще и результат функции не забудь проверить после работы.


 
Intell ©   (2003-05-27 17:37) [4]

Спасибо!

>Skier
кодируем, кодируем...



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

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

Наверх




Память: 0.47 MB
Время: 0.014 c
7-26804
student_
2003-04-02 09:48
2003.06.09
Как встроить ехе-файл


1-26533
testthewest
2003-05-27 13:01
2003.06.09
RichEdit


1-26505
pirat
2003-05-30 00:29
2003.06.09
Как из подручных элементов собрать текстовое меню


14-26777
KSergey
2003-05-21 08:38
2003.06.09
Презентация Microsoft Windows Server 2003


14-26687
Scorpx
2003-05-25 10:28
2003.06.09
Новая функция у программы