FileFindFirstFile()
FileFindFirstFile()
(OP)
Hello for everyone!![[peace] peace](https://www.tipmaster.com/images/peace.gif)
I'm working a great project,that's name is "Unatended WindowsXp"![[pc3] pc3](https://www.tipmaster.com/images/pc3.gif)
The idea is not really new,and not is mine,but I can do that too...Some files during Windows setup will be copying to the 'TempInstall' dir of the system drive.They'll be installing silently.And here comes my little problem:after installation I wanna delete this temprorary setup files from the system drive...So the question is there any function or procedure that uses the following things like these:
"FileFindFirstFile()"seekin' of the setup files,and when it find one then a new function should goes like "FileFindNextFile()" that will be keep searching for the remaining files .....
These codes can be write in 'AUTOIT' scripting but I wanna to write that in Pascal.....
Someone could help me?
![[peace] peace](https://www.tipmaster.com/images/peace.gif)
I'm working a great project,that's name is "Unatended WindowsXp"
![[pc3] pc3](https://www.tipmaster.com/images/pc3.gif)
The idea is not really new,and not is mine,but I can do that too...Some files during Windows setup will be copying to the 'TempInstall' dir of the system drive.They'll be installing silently.And here comes my little problem:after installation I wanna delete this temprorary setup files from the system drive...So the question is there any function or procedure that uses the following things like these:
![[thumbsup] thumbsup](https://www.tipmaster.com/images/thumbsup.gif)
"FileFindFirstFile()"seekin' of the setup files,and when it find one then a new function should goes like "FileFindNextFile()" that will be keep searching for the remaining files .....
These codes can be write in 'AUTOIT' scripting but I wanna to write that in Pascal.....
Someone could help me?
RE: FileFindFirstFile()
In Pascal you have FindFirst and FindNext in the dos unit.
CODE --> Turbo Pascal
var sea:SearchRec;
begin
FindFirst('tempdir\*.*',AnyFile,sea);
while DosError=0 do begin
Write(sea.name,' is a ');
if sea.attr and Directory=Directory then Writeln('directory') else Writeln('regular file');
FindNext(sea);
end;
end.
Feherke.
http://rootshell.be/~feherke/