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

Вниз

Как скопировать файл на диск(дискету,диск) с заменой уже существу   Найти похожие ветки 

 
dreds   (2004-01-21 10:37) [0]

1) Как скопировать файл на диск(дискету,диск) с заменой уже существующего(без запроса на замену).
2) Возможно ли скопировать файл на диск с предварительным архививированием через WinRar(т.е. програмным путем заорхивировать файл скрытно).


 
Oyster ©   (2004-01-21 10:51) [1]

Не знаю насчет архивирования, а скопировать, по-моему, можно так же, как если бы файла не было. Если CopyFile не помогает, можно написать свою процедуру копирования файлов через нетипизированные файлы.


 
TUser ©   (2004-01-21 10:55) [2]

Для архивирования есть специальные компоненты. Покопай на torry - выбери, что тебе подходит.


 
dreds   (2004-01-21 11:09) [3]

Скажите поподробней по поводу CopyFile?


 
sVic   (2004-01-21 11:28) [4]

http://delphimaster.net/view/1-1074606027/


 
TLamer ©   (2004-01-21 12:04) [5]

The CopyFile function copies an existing file to a new file.

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
);


Parameters

<...>

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.

Return Values

If the function succeeds, the return value is nonzero.


 
TLamer ©   (2004-01-21 12:05) [6]

Это для ДОС-овского РАРа

function PackFileRar(SrcDir,SrcFile : string) : string;
var
si:STARTUPINFO;
pi:PROCESS_INFORMATION;
CmdLine,ResFile : string;
begin
ZeroMemory(@si,sizeof(si));
si.cb:=SizeOf(si);
ResFile := SrcDir + ChangeFileExt(SrcFile,".exe");
CmdLine := pathRARfile + "Rar.exe a -y -u -ep -sfx -std " + ResFile +" "+ SrcDir + SrcFile;
if not CreateProcess( nil,
PChar(CmdLine),
nil,
nil,
False,
0,
nil,
nil,
si,
pi )
then PackFileRar := "Error";
WaitForSingleObject( pi.hProcess, INFINITE );
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
PackFileRar := ResFile;
end;



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

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

Наверх




Память: 0.48 MB
Время: 0.026 c
3-2019
Paster
2004-01-06 16:09
2004.02.02
Тригеры


14-2278
Centurion
2004-01-09 16:30
2004.02.02
монаж видео


1-2098
Opryshok
2004-01-19 15:07
2004.02.02
Easy Parse HTML


3-1976
Talla2k
2004-01-09 03:06
2004.02.02
Oracle//создание НД


1-2177
cyborg
2004-01-22 09:31
2004.02.02
TDateTimePicker