Directorio y descarga mediante SFTP
Moderator: Rathinagiri
- serge_girard
- Posts: 2371
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Has thanked: 628 times
- Been thanked: 126 times
- Contact:
Re: Directorio y descarga mediante SFTP
C:\Documents and Settings is often a problem!
I would never use it for my docs or other files. Some time ago a friend of my 'lost' his user and finally also lost the C:\Documents and Settings that belong to it.
Serge
I would never use it for my docs or other files. Some time ago a friend of my 'lost' his user and finally also lost the C:\Documents and Settings that belong to it.
Serge
- andyglezl
- Posts: 1191
- Joined: Fri Oct 26, 2012 7:58 pm
- Location: Guadalajara Jalisco, MX
- Has thanked: 37 times
- Been thanked: 85 times
- Contact:
Hace mucho tiempo, yo tuve un problema similar y desde entonces hice lo siguiente:
*----------------------------------------------------------------------------------------------------------
A long time ago, I had a similar problem and since then I did the following:
https://ccm.net/faq/30784-windows-7-mov ... tion-drive
*----------------------------------------------------------------------------------------------------------
A long time ago, I had a similar problem and since then I did the following:
https://ccm.net/faq/30784-windows-7-mov ... tion-drive
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
-
- Posts: 516
- Joined: Thu Oct 16, 2014 11:35 am
- Location: Poland
- Has thanked: 137 times
- Been thanked: 438 times
To prevent error occurs on links (but their content may still not be displayed), please replace this functions:vientopamperosur wrote: ↑Thu Nov 22, 2018 11:39 pmBuenas 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...
Code: Select all
***********************************
FUNCTION RefreshRemoteGrid ( aRemoteDir, xPos )
Local aItem, i:=1
sftp.RemoteGrid.DisableUpdate()
sftp.RemoteGrid.DeleteAllItems
FOR EACH aItem IN aRemoteDir
sftp.RemoteGrid.AddItem(aItem)
i := sftp.RemoteGrid.ItemCount
IF 'D' $ Upper ( sftp.RemoteGrid.CellEx( i, 5) )
sftp.RemoteGrid.ImageIndex (i, 1) := 1 //folders icon
ENDIF
NEXT
DO CASE
CASE hb_IsNumeric( xPos )
xPos := MIN( xPos, i )
CASE hb_IsChar (xPos )
xPos := MAX (1, ASCAN ( aRemoteDir, { |x| x [ 1 ] == xPos } ) )
OTHER
xPos := 1
ENDCASE
sftp.RemoteGrid.Value := xPos
sftp.RemoteGrid.EnableUpdate()
sftp.LabelRemote.Value := "/" + cRemoteDir
RETURN Nil
***********************************
FUNCTION RefreshLocalGrid ( aLocalDir, xPos )
Local aItem, i:=1
sftp.LocalGrid.DisableUpdate()
sftp.LocalGrid.DeleteAllItems
FOR EACH aItem IN aLocalDir
sftp.LocalGrid.AddItem(aItem)
i := sftp.LocalGrid.ItemCount
IF 'D' $ Upper ( sftp.LocalGrid.CellEx( i, 5) )
sftp.LocalGrid.ImageIndex (i, 1) := 1 //folders icon
ENDIF
NEXT
DO CASE
CASE hb_IsNumeric( xPos )
xPos := MIN( xPos, i )
CASE hb_IsChar (xPos )
xPos := MAX (1, ASCAN ( aLocalDir, { |x| x [ 1 ] == xPos } ) )
OTHER
xPos := 1
ENDCASE
sftp.LocalGrid.Value := xPos
sftp.LocalGrid.EnableUpdate()
sftp.LabelLocal.Value := cLocalDir
RETURN Nil
*******************************************************************************
FUNCTION LocalDir (aDir)
Local a1List, aDirectory:={}, a1Dir
FOR EACH a1List IN aDir
IF 'D' $ Upper(a1List[5]) .AND. a1List[1] =="." // Skip "." folder
LOOP
ENDIF
a1Dir := ARRAY(5)
DO CASE
CASE 'L' $ Upper (a1List[5]) //link name
a1Dir[1] := "[ " + a1List[1] + " ]"
a1Dir[2] := "<LNK>"
CASE 'D' $ Upper (a1List[5]) //dir name
a1Dir[1] := "[ " + a1List[1] + " ]"
a1Dir[2] := "<DIR>"
OTHER
a1Dir[1] := a1List[1]
a1Dir[2] := Alltrim(Str(a1List[2]))
ENDCASE
a1Dir[3] := a1List[3]
a1Dir[4] := a1List[4]
a1Dir[5] := a1List[5]
AADD(aDirectory, a1Dir)
NEXT
IF EMPTY( aDirectory ) //no parrent directory
AADD(aDirectory, {"[ .. ]", "<DIR>", "", "", "d" }) //add parent directory
ENDIF
//soft list
aDirectory:=ASORT ( aDirectory, , , { |x, y| IF('D' $ Upper(x[5]), '0', '1') + Lower(x[1]) < IF('D' $ Upper(y[5]), '0', '1') + Lower(y[1]) } )
RETURN aDirectory
-
- Posts: 516
- Joined: Thu Oct 16, 2014 11:35 am
- Location: Poland
- Has thanked: 137 times
- Been thanked: 438 times
Similarly, the system command line behaves. Also does not list content, although the description about symbolic links and reparse points, says that the operating system should automatically find the target object and work on the content found.
As can be seen from the above screenshot, that in this case it is not.
- vientopamperosur
- Posts: 42
- Joined: Thu Aug 28, 2014 10:13 am
- DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
- Location: Buenos Aires
- Has thanked: 1 time
- Contact:
Muchas gracias por compartir, ya tengo unos años en esto y lo que aprendo cada día con Ustedes es increíble, ya casi se ha convertido una adicción para mi. Gracias a todos...
Hello, I needed to help
build.bat sftp.prg hbcurl.hbc -o"SFTP Navigator"
works without problems
I'm using when compiling HMG-IDE
i do not know how to include hbcurl.hbc
between linking commands
if it is not there (hbcurl.hbc)
an error message will appear
hbmk2: Compiling Harbour sources...
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
hbmk2: Compiling...
hbmk2: Linking... sftp.exe
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x3d8): undefined reference to `HB_FUN_CURL_EASY_INIT'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x3f8): undefined reference to `HB_FUN_CURL_EASY_RESET'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x418): undefined reference to `HB_FUN_CURL_EASY_PERFORM'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x438): undefined reference to `HB_FUN_CURL_EASY_STRERROR'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x488): undefined reference to `HB_FUN_CURL_GLOBAL_CLEANUP'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x498): undefined reference to `HB_FUN_CURL_EASY_ESCAPE'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x4a8): undefined reference to `HB_FUN_CURL_EASY_SETOPT'
collect2.exe: error: ld returned 1 exit status
Thanks for help
build.bat sftp.prg hbcurl.hbc -o"SFTP Navigator"
works without problems
I'm using when compiling HMG-IDE
i do not know how to include hbcurl.hbc
between linking commands
if it is not there (hbcurl.hbc)
an error message will appear
hbmk2: Compiling Harbour sources...
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
hbmk2: Compiling...
hbmk2: Linking... sftp.exe
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x3d8): undefined reference to `HB_FUN_CURL_EASY_INIT'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x3f8): undefined reference to `HB_FUN_CURL_EASY_RESET'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x418): undefined reference to `HB_FUN_CURL_EASY_PERFORM'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x438): undefined reference to `HB_FUN_CURL_EASY_STRERROR'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x488): undefined reference to `HB_FUN_CURL_GLOBAL_CLEANUP'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x498): undefined reference to `HB_FUN_CURL_EASY_ESCAPE'
.hbmk/win/mingw/sftp.o:sftp.c:(.data+0x4a8): undefined reference to `HB_FUN_CURL_EASY_SETOPT'
collect2.exe: error: ld returned 1 exit status
Thanks for help
Hello everyone
I needed to connect to SFTP using Host Private Key file.
there is an option in the SFTP navigator, but I can not connect with it
did anyone try it out of you?
Thanks for help
I needed to connect to SFTP using Host Private Key file.
there is an option in the SFTP navigator, but I can not connect with it
did anyone try it out of you?
Thanks for help
- serge_girard
- Posts: 2371
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Has thanked: 628 times
- Been thanked: 126 times
- Contact:
Thx Serge
I have no problem with compilation but with connection using Host Private Key file.
I have no problem with compilation but with connection using Host Private Key file.