AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

read from multiple Files

Ein Thema von mohfa · begonnen am 25. Mär 2009 · letzter Beitrag vom 26. Mär 2009
 
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#1

read from multiple Files

  Alt 25. Mär 2009, 18:23
Hi every body .

I have this Code :

Delphi-Quellcode:
Procedure Load(const AFilename: String);
var
  MS : TMemoryStream;
  FS : TFileStream;

begin

    if FileExists(AFilename) then
    begin
      MS := TMemoryStream.Create;
      try
        FS := TFileStream.Create(AFilename, fmOpenRead or fmShareDenyNone);
        try
          MS.Size := FS.Size;
          FS.Position := 0;
          MS.Position := 0;
          MS.CopyFrom(FS, 0);
        finally
          FS.Free;
        end;
      finally
        MS.Free;
      end;
    end;
  end;
This Loads only One File into FS ;

But if i want to load many files into FS how does it be possible ???

i tried to do the Following :

Delphi-Quellcode:
Procedure Load(const AFilename: String);
var
  MS : TMemoryStream;
  FS : TFileStream;
MyStringList:TStringList;
i:integer;
begin
MyStringList:=TStringList.Create;
For i:=0 to MyStringList.count-1 do
if FileExists(MyStringList[i]) then
.
.
.
.
But it doesn't work


Many thanks
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:00 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz