vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
SEPA-Dateien erstellen inkl. IBAN-, BLZ-/Kontonummernprüfung  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: Download verzeichnis bestimmen 
Autor: marina
Datum: 25.08.06 16:11

Teil 5

///
/// Delete a file from the remote FTP server.
///
///
public void deleteRemoteFile(string fileName)
{

if(!logined)
{
login();
}

sendCommand("DELE "+fileName);

if(retValue != 250)
{
throw new IOException(reply.Substring(4));
}

}

///
/// Rename a file on the remote FTP server.
///
///
///
public void renameRemoteFile(string oldFileName,string
newFileName)
{

if(!logined)
{
login();
}

sendCommand("RNFR "+oldFileName);

if(retValue != 350)
{
throw new IOException(reply.Substring(4));
}

// known problem
// rnto will not take care of existing file.
// i.e. It will overwrite if newFileName exist
sendCommand("RNTO "+newFileName);
if(retValue != 250)
{
throw new IOException(reply.Substring(4));
}

}

///
/// Create a directory on the remote FTP server.
///
///
public void mkdir(string dirName)
{

if(!logined)
{
login();
}

sendCommand("MKD "+dirName);

if(retValue != 250)
{
throw new IOException(reply.Substring(4));
}

}

///
/// Delete a directory on the remote FTP server.
///
///
public void rmdir(string dirName)
{

if(!logined)
{
login();
}

sendCommand("RMD "+dirName);

if(retValue != 250)
{
throw new IOException(reply.Substring(4));
}

}

///
/// Change the current working directory on the remote FTP server.
///
///
public void chdir(string dirName)
{

if(dirName.Equals("."))
{
return;
}

if(!logined)
{
login();
}

sendCommand("CWD "+dirName);

if(retValue != 250)
{
throw new IOException(reply.Substring(4));
}

this.remotePath = dirName;

Console.WriteLine("Current directory is "+remotePath);

}

///
/// Close the FTP connection.
///
public void close()
{

if( clientSocket != null )
{
sendCommand("QUIT");
}

cleanup();
Console.WriteLine("Closing...");
}

///
/// Set debug mode.
///
///
public void setDebug(Boolean debug)
{
this.debug = debug;
}

private void readReply()
{
mes = "";
reply = readLine();

retValue = Int32.Parse(reply.Substring(0,3));
}

private void cleanup()
{
if(clientSocket!=null)
{
clientSocket.Close();
clientSocket = null;
}
logined = false;
}
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Download verzeichnis bestimmen1.191marina25.08.06 10:13
Re: Download verzeichnis bestimmen743ModeratorFZelle25.08.06 11:45
Re: Download verzeichnis bestimmen732marina25.08.06 11:48
Re: Download verzeichnis bestimmen730uliop197825.08.06 14:16
Re: Download verzeichnis bestimmen711ModeratorFZelle25.08.06 14:24
Re: Download verzeichnis bestimmen770uliop197825.08.06 14:35
Re: Download verzeichnis bestimmen773ModeratorFZelle27.08.06 20:01
Re: Download verzeichnis bestimmen758uliop197828.08.06 10:42
Re: Download verzeichnis bestimmen856ModeratorFZelle28.08.06 20:19
Re: Download verzeichnis bestimmen771uliop197829.08.06 09:08
Re: Download verzeichnis bestimmen779marina25.08.06 16:06
Re: Download verzeichnis bestimmen752marina25.08.06 16:08
Re: Download verzeichnis bestimmen694marina25.08.06 16:10
Re: Download verzeichnis bestimmen810marina25.08.06 16:11
Re: Download verzeichnis bestimmen693marina25.08.06 16:11
Re: Download verzeichnis bestimmen741marina25.08.06 16:09
Re: Download verzeichnis bestimmen765uliop197825.08.06 16:56
Re: Download verzeichnis bestimmen739marina25.08.06 18:01

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel