Autor Beitrag
DeltaEx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 110



BeitragVerfasst: Sa 07.12.02 15:55 
Meine Frage ist wie kann ich einen ganzen ordner ca. 700MB vom PC1 auf PC2 kopieren?`

Auf PC1 befindet sich ein Server und auch PC2 ein Client
Benutze Indy Komponenten

Wie ich es gamacht habe geht es nur bis ca.650kb:-(

Das ist der Client:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
procedure TForm1.Button5Click(Sender: TObject);
var
    ftmpStreamo : TFileStream;

begin
client.Host := edit1.Text;
//ipinput.Items[ipinput.ItemIndex];
try
with client do
    begin
    if connected then DisConnect;
    Connect;
    WriteLn('SRNO');

    ftmpStreamo := TFileStream.Create(ExtractFileDir(ParamStr(0)) + '\DirectDVD.exe',fmCreate);
    while connected do
        ReadStream(fTmpStreamo,-1,true);
    FreeAndNil(fTmpStreamo);
    Disconnect;
    end;
except
on E : Exception do
    ShowMessage(E.Message);
end;

end;


Und das der Server:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
if sCommand = 'SRNO' then
    begin
         //----Jetzt senden---------
        fStream := TFileStream.Create('D:\Programme\DirectDVD.exe',fmOpenRead + fmShareDenyNone);

        AThread.Connection.OpenWriteBuffer;
        Athread.Connection.WriteStream(fStream);
        AThread.Connection.CloseWriteBuffer;

        FreeAndNil(fStream);

        AThread.Connection.Disconnect;
    end;



Die DirectDVD.exe ist 10,5MB groß, aber wenn ich sie rüberschicke ist sie nur 650kb klein:-((( BITTE HILFT MIR

_________________
Delphi forever
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: So 08.12.02 11:22 
hi du ....

machs doch aeinfach so

1) Remote Ordnername auslesen
2) Lokalen Ordner erstellen
3) In die Ordner wechseln
4) Datein kopiern

ich denk das is die beste idee (und auch die einzige Lösung da die Win API keine funktion dafür vorsieht oder? )

MfG BungeeBug
DeltaEx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 110



BeitragVerfasst: So 08.12.02 12:37 
??? hä ich will das Über ein Netzwerk machen und mit deiner Anwort kann ich leider nix anfangen :(

_________________
Delphi forever
Millo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 147



BeitragVerfasst: So 08.12.02 13:12 
Moin

@ DeltaEx
Er will zuerst den Ordnernamen auslesen von dem Rechner auf den du zugreifst (Remote)
Dann sollst du bei dir den Ordner erstellen (Lokal)
Dann sollst du in den Ordner den du kopieren willst reingehen, un den Ordner bei dir wo das hin kopiert wird.
Dann sollst du alle Dateien des Ordners (Remote) auf deine (Lokal) kopieren.
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: So 08.12.02 13:22 
ganau das :P ich wusste man würde micht versten :P
DeltaEx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 110



BeitragVerfasst: So 08.12.02 23:56 
Das ist mir klar aber wie mache ich das?? CODE?

_________________
Delphi forever
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Mo 09.12.02 07:17 
schau mal unter www.delphi-treff.de nach dem EDH oder unter www.dephi-source.de nach nem Tutorial da findest du alles was du brachst ...

MfG BungeeBug