merci, ca marche impecable, je vous laisse un morceau du code au cas ou cela interresserait quelqu´un :
procedure findfichiers ( chemin,nom,nvchemin : string);
var
test : WIN32_FIND_DATA;
lb : longbool;
dwError : DWORD;
hFind : integer;
begin
/ /init
hFind := INVALID_HANDLE_VALUE;
lb := true;
hFind := FindFirstFile(PChar(chemin + nom),test);
if ( hFind = INVALID_HANDLE_VALUE) then
begin
writeln ( ´Invalid file handle. Error is ´ + inttostr(GetLastError()));
end
else
begin
writeln ( ´Le premier fichier : ´ + test.cFileName);
/ /copie du fichier
CopyFile(PChar(chemin + test.cFileName),PChar(nvchemin + test.cFileName),lb);
while ( FindNextFile(hFind, test)) do
begin
writeln ( ´Le prochain fichier : ´ + test.cFileName);
/ /copie du fichier
CopyFile(PChar(chemin + test.cFileName),PChar(nvchemin + test.cFileName),lb);
end;
dwError := GetLastError();
if ( dwError < > ERROR_NO_MORE_FILES) then
begin
writeln ( ´FindNextFile error. Error is ´ + inttostr(dwError));
end
end;
/ /FindClose(hFind);
end;