Autor Beitrag
estrella1410
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Di 13.05.08 07:23 
Hallo,

also ich möchte gerne eine log datei vom server (laufwerk c: )auf den lokalen rechner kopieren
habe nun schon einiges versucht..via ftp klappt es nun auch nicht hat jemand eine idee??

Estrellita
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Di 13.05.08 11:46 
Freigabe auf dem Server erstellen und darüber darauf zugreifen.
estrella1410 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Mo 26.05.08 07:44 
aber wie binde ich dass den in ein c# programm ein ?? ich habs so versucht:

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
            do
            {
                server = sr_log.ReadLine();

                Process pProgramm = new Process();
                pProgramm.StartInfo.FileName = @"C:\WINNT\system32\cmd.exe";
             
            pProgramm.StartInfo.Arguments = @"/C copy +server+"\\"+C:\\test.log \\\\C:\\Dienste\\test.log";
            
                pProgramm.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
                pProgramm.Start();
                pProgramm.WaitForExit();

            } while (sr_log.EndOfStream == false);


bräuchte da nochmal n arschtritt wie ich weiter komme dass es klappt...

Moderiert von user profile iconChristian S.: Code- durch C#-Tags ersetzt
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Mo 26.05.08 12:22 
Warum die Kommandozeile bemühen?
Gibt's denn da nicht auch was im Framework? Na, klar.

ausblenden C#-Quelltext
1:
File.Copy(@"C:\test.log"@"\\server\c$\Dienste\test.log");					


Solltest du das ohne Server Admin Rechte machen wollen oder jemand hat die Adminfreigaben dicht gemacht brauchst du natürlich noch'ne richtige Freigabe wie schon von Uwe? erwähnt.