1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
begin
{$I-}
mkdir(rep+'Dossiers\'+edit1.text);
if IOResult <>0then
showmessage('Impossible de créer le répertoire')
else begin
showMessage('Nouveau Dossier créé');
If FindFirst(rep+'Dossiers'+edit1.text,faAnyFile,Info)<>0 Then
begin
Attributs := FileGetAttr(rep+'Dossiers'+'\Doss.txt');
if Attributs and faReadOnly = faReadOnly then begin
FileSetAttr(rep+'Dossiers'+'\Doss.txt', Attributs and not faReadOnly);
assignfile(fs,rep+'Dossiers'+'\Doss.txt');
//reset(fs);
ligne:=edit1.text;
append(fs);
writeln(fs,ligne);
end;
closefile(fs);
Attributs := FileGetAttr(rep+'Dossiers'+'\Doss.txt');
if Attributs and faReadOnly = 0 then FileSetAttr(rep+'Dossiers'+'\Doss.txt', Attributs + faReadOnly);
close; |
Partager