Directorio y descarga mediante SFTP

HMG en Español

Moderator: Rathinagiri

edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Directorio y descarga mediante SFTP

Post by edk »

Intenta compilar de esta manera:

Code: Select all

build.bat sftp.prg hbcurl.hbc -o"SFTP Navigator"
User avatar
vientopamperosur
Posts: 59
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Contact:

Re: Directorio y descarga mediante SFTP

Post by vientopamperosur »

Muchísimas gracias, ya pude compilas, ahora a investigar un poco...
User avatar
vientopamperosur
Posts: 59
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Contact:

Re: Directorio y descarga mediante SFTP

Post by vientopamperosur »

Buenas noches. Ese programa me serviría para conectarme vía ftp normal?. Tendria que hacerle muchos cambios?
User avatar
vientopamperosur
Posts: 59
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Contact:

Re: Directorio y descarga mediante SFTP

Post by vientopamperosur »

Buen día,he quedado a la mitad de mi investigación pues no logro conectarme a un ftp. necesitaría otras librerías?
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Directorio y descarga mediante SFTP

Post by edk »

Prueba esta versión.
sftp.prg.7z
(6.8 KiB) Downloaded 285 times
Distingue entre los protocolos SFTP y FTP.
User avatar
vientopamperosur
Posts: 59
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Contact:

Re: Directorio y descarga mediante SFTP

Post by vientopamperosur »

Gracias. Voy a probarlo!
User avatar
vientopamperosur
Posts: 59
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Contact:

Re: Directorio y descarga mediante SFTP

Post by vientopamperosur »

Gracias por compartir, funciona perfectamente y voy a aplicar el concepto para otra aplicación. Pronto tendré novedades... Gracias.
User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: Directorio y descarga mediante SFTP

Post by Steed »

thanks
User avatar
vientopamperosur
Posts: 59
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Contact:

Re: Directorio y descarga mediante SFTP

Post by vientopamperosur »

Buenas tardes. Estoy probando este exelente ejemplo y la verdad es que lo encuentro extremadamente útil y claro. Solo me encuentro con un error que no puedo identificar cuando intento leer carpetas con dos espacios, como por ejemplo Archivos de Programa, Document and Setting, etc. Adjunto la captura de pantalla del mensaje. Gracias...
Attachments
Sin título.png
Sin título.png (7.49 KiB) Viewed 2856 times
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Directorio y descarga mediante SFTP

Post by edk »

vientopamperosur wrote: Thu Nov 22, 2018 11:39 pm Buenas tardes. Estoy probando este exelente ejemplo y la verdad es que lo encuentro extremadamente útil y claro. Solo me encuentro con un error que no puedo identificar cuando intento leer carpetas con dos espacios, como por ejemplo Archivos de Programa, Document and Setting, etc. Adjunto la captura de pantalla del mensaje. Gracias...
This problem is related to the fact that the indicated folders are not real folders but the links.
The "C:\Documents and Settings" path really indicates the location of "C:\Users".
I tried various functions of the harbour to read the contents of this folder, but unfortunately all of them return an empty array.
There is a hb_vfLinkRead function that reads a hard link, but it only applies to files (not folders).

An interesting fact is that after changing the working folder by DirChange ("C:\Documents and Settings"), the hb_CWD () function returns the folder's link name, not the real path name.

We need a function that allows to read the real name of the path from links, but I can not find it in the harbour. :(

Code: Select all

cSymLink:="C:\Documents and Settings\"
MsgDebug("DIRECTORY", DIRECTORY( cSymLink, "DHSL"))
MsgDebug("hb_Directory", hb_Directory(cSymLink, "DHSL"))
MsgDebug("hb_DirScan", hb_DirScan(cSymLink,,"DHSL"))
MsgDebug("hb_vfDirectory", hb_vfDirectory(cSymLink,"DHSL"))

MsgDebug("hb_vfLinkRead", hb_vfLinkRead(cSymLink))

MsgDebug("hb_vfDirExists", hb_vfDirExists(cSymLink))
MsgDebug("hb_DirExists", hb_DirExists(cSymLink))

MsgDebug("DirChange", DirChange(cSymLink))
MsgDebug("hb_CWD()", hb_CWD())
Post Reply