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

Вниз

Как очистить папку Temp   Найти похожие ветки 

 
Lagutin Anton   (2002-04-28 04:30) [0]

Please, подскажите как очистить папку Темр


 
Anatoly Podgoretsky ©   (2002-04-28 08:49) [1]

DeleteFile


 
Song ©   (2002-04-28 09:59) [2]

В FAQ есть пример


 
VEG ©   (2002-04-28 11:21) [3]

function DeleteDir(Dir : string) : boolean;
Var
Found : integer;
SearchRec : TSearchRec;
begin
result:=false;
if IOResult<>0 then ;
ChDir(Dir);
if IOResult<>0 then begin
ShowMessage("Не могу войти в каталог: "+Dir); exit;
end;
Found := FindFirst("*.*", faAnyFile, SearchRec);
while Found = 0 do
begin
if (SearchRec.Name<>".")and(SearchRec.Name<>"..") then
if (SearchRec.Attr and faDirectory)<>0 then begin
if not DeleteDir(SearchRec.Name) then exit;
end else
if not DeleteFile(SearchRec.Name) then begin
ShowMessage("Не могу удалить файл: "+SearchRec.Name); exit;
end;
Found := FindNext(SearchRec);
end;
FindClose(SearchRec);
ChDir(".."); RmDir(Dir);
result:=IOResult=0;
end;


Для кнопочки:
var
s1 : array[0..254] of Char;
begin
GetWindowsDirectory(s1,255);
DeleteDir(s1+"\TEMP\");
end;


 
Song ©   (2002-04-28 14:59) [4]

2VEG © (28.04.02 11:21)
Зачем +"\TEMP\" приписал? :))))


 
Севостьянов Игорь ©   (2002-04-29 12:33) [5]

Это точно вот функции из unit FileUtil

GetSystemDir: string;
GetWindowsDir: string;
GetTempDir: string;



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

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

Наверх




Память: 0.47 MB
Время: 0.015 c
1-39713
Chilly Willy
2002-04-24 18:22
2002.05.13
Чтение текстового файла, открытого другой программой.


1-39762
Vyatcheslav
2002-04-26 09:29
2002.05.13
Ищу компонент


4-39919
Prof!
2002-03-09 21:04
2002.05.13
>>HOOK!!!!!!!!!!!!!!!!!!!!!!!!<<


4-39912
Nimble
2002-03-13 08:22
2002.05.13
SysTray


6-39816
Relaxoid
2002-02-28 15:37
2002.05.13
Где достать исходники nbtstat?