Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Internet (https://www.clubdelphi.com/foros/forumdisplay.php?f=3)
-   -   Descargar archivos del Servidor (https://www.clubdelphi.com/foros/showthread.php?t=52917)

chrids506 04-02-2008 19:49:29

Descargar archivos del Servidor
 
Saludos Caballeros, tengo un pequeño problema, tengo una página en php que lee la información desde archivos xml, estos archivos son generados desde delphi y subidos con el siguiente código:

Código Delphi [-]
  with IdFTP1 do try
    Connect;
  finally
    if Connected then begin
          IdFTP1.Put(EIMA1.Text, ExtractFileName(EIMA1.Text));
    end;
  end;
   IdFTP1.Disconnect;

Donde EIMA1 Representa un edit que contiene la ruta del archivo, hasta aquí todo bien, sin embargo lo que quiero hacer es bajar todos los archivos xml del servidor cada vez que se cargue el programa, y así lograr ya sea editarlos o a la hora de crear uno nuevo saber que ya existe uno con el mismo nombre haciendo la comprobación en local, en sintesis, quiero descargar todos los archivos xml en una ruta en un servidor, espero que puedan ayudarme, gracias

Nota:
Delphi 7
todos los documentos se encuentran en la raíz de la cuenta con que se conecta el programa
Servidor Propio con todos los privilegios

chrids506 04-02-2008 21:51:28

De otra manera
 
Ustedes creen que sea mejor en lugar de tener 500 archivos xml de un bloque, tener 1 archivo xml de 500 bloques? osea, no se hará la carga mas pesada?
no se hará demasiado grande?

jachguate 04-02-2008 21:57:27

Cita:

Empezado por chrids506 (Mensaje 263321)
quiero descargar todos los archivos xml en una ruta en un servidor, espero que puedan ayudarme, gracias

[pseudocodigo]
inicio
AbrirConexion;
ObtenerListaDeArchivosEn(Lista);
For I := 0 to Lista.Count - 1 do
BajarArchivo(Lista[i]);
fin;
[/pseudocódigo]

Hasta luego.

;)

chrids506 04-02-2008 22:11:56

Gracias
 
Gracias, pero tenés idea de como hacer esto?:

ObtenerListaDeArchivosEn(Lista);

jachguate 04-02-2008 22:53:48

De la ayuda de delphi:

Cita:

Empezado por Indy help
Declaration
Código Delphi [-]
procedure List; overload;
Summary
Retrieves a list of files and directories on the FTP server.
Description
.NET Overload
List is an overloaded procedure used to request a list of files or directories in the current directory on the FTP server.

Unlike overloadeed variants of the List method, no file specifier is used and file details are always returned. List calls the overloaded List method using an Unassigned (Nil) value for the storage of the textual responses that make up the directory listing.
...
Textual responses to the FTP command are captured and stored in the ListResult property. The value of the UsedMLS property is set to False to indicate that the MLST parser should not be used on textual values in the ListResult property.

List will clear any existing entries found in the DirectoryListing property, and free the collection used for the structured directory listing. The collection is recreated and values in the ListResult are parsed into collection items on the initial read access to the DirectoryListing property.

See Also
ListResult, DirectoryListing, List, CanUseMLS, UsedMLS, ExtListDir, TransferType
Class
TIdFTP

Hasta luego.

;)

chrids506 04-02-2008 23:49:25

Gracias caballero era exactamente lo que buscaba


La franja horaria es GMT +2. Ahora son las 08:46:05.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi