Einzelnen Beitrag anzeigen

Alex_ITA01

Registriert seit: 22. Sep 2003
1.115 Beiträge
 
Delphi 12 Athens
 
#1

File Acess Denied ???

  Alt 19. Nov 2003, 09:37
hallo erstmal,
habe ein großes problem denn ich kann auf einmal nix mehr in meine typisierte datei schreiben.
sobald die write anweisung kommt schmiert er ab und bringt FILE ACESS DENIED
ich habe es schon probiert die dateiattribute zu setzen nur das ändert das Porblem nicht.hat da einer eine idee???

Delphi-Quellcode:
  if Form1.OpenDialog1Mp3.Execute then
  begin
    Form1.ListBox2.Items.AddStrings(Form1.OpenDialog1Mp3.Files);
    reset(mp3);
    for p := 0 to Form1.ListBox2.Items.Count -1 do
    begin
      try
        DateiInfo.Name := Form1.ListBox2.Items[p];
        seek(mp3,FileSize(mp3));
        Code := Poly.Verschluesseln(Dateiinfo.Name);
        Dateiinfo.Name := Code;
        //closeFile(mp3); //habe hier probiert die datei nochmal neu zu schließen und wieder zu öffnen
        //reset(mp3);
        //seek(mp3,FileSize(mp3));
        write(mp3,DateiInfo);
        Form5.ListBox1.Items.Add(ExtractFileName(Form1.ListBox2.Items[p]));
      except
        raise;
      end;
    end;
    CloseFile(mp3);
  end;
  Form5.Label1.Caption := 'Anzahl: ' + IntToStr(Form5.ListBox1.Items.Count);
end;
  Mit Zitat antworten Zitat