Get FileList on Remote PC via SFTP

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

MichaelS
Posts: 24
Joined: Sat Jan 18, 2020 5:24 pm

Re: Get FileList on Remote PC via SFTP

Post by MichaelS » Mon May 25, 2020 10:51 am

Hi,
thanks for the Sample Stack.

Upload/Download is working without Problems.

SFTP DirList Example is not working. I did test it
on my Raspberry and although on my Root Server,
on Linux PC and on my MacBook.
The Error Message is the same :

Error tsneterr: (79) Error in the SSH layer returned from Server.

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 190
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: Get FileList on Remote PC via SFTP

Post by matthiasr » Mon May 25, 2020 11:18 am

@Michael
Tried the sample stack here also with my Synology NAS. Same result.

Upload / Download works, file listing not.

I should have some working code somewhere. Will have a look later after lunch.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Get FileList on Remote PC via SFTP

Post by bangkok » Mon May 25, 2020 11:38 am

matthiasr wrote:
Mon May 25, 2020 11:18 am
@Michael
Tried the sample stack here also with my Synology NAS. Same result.

Upload / Download works, file listing not.
I confirm.

But it's twisted.

the Dir list works fine (with the URL provided in the stack)... on LC Indy 8.1.10 !

But fails on LC Indy 9.6 rc2 and LC Indy 9.5.1.

Tested on both MacOS Catalina 10.15.4 and Windows 8.1.

I've opened a bug report.

MichaelS
Posts: 24
Joined: Sat Jan 18, 2020 5:24 pm

Re: Get FileList on Remote PC via SFTP

Post by MichaelS » Mon May 25, 2020 2:29 pm

Okay, thanks a lot for the Information. I thought it was
my mistake.

Regards
Michael

MichaelS
Posts: 24
Joined: Sat Jan 18, 2020 5:24 pm

Re: Get FileList on Remote PC via SFTP

Post by MichaelS » Thu May 28, 2020 6:54 pm

Hello again,
i found a Solution to get the Directory. Not with SFTP but it is working...

Code: Select all

on mouseUp
   put shell("ssh pi@192.168.178.31 ls /home/pi & exit") into fld "Ausgabe"-- returns a listing of the remote dir on Unix
end mouseUp
Best Regards
and stays healthy
Michael

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Get FileList on Remote PC via SFTP

Post by bangkok » Mon Jun 08, 2020 12:29 pm

The new version of tsNet available here :

https://quality.livecode.com/show_bug.cgi?id=22638

solves the problem (tested on Windows 10)

Bug report here :

https://quality.livecode.com/show_bug.cgi?id=22746

MichaelS
Posts: 24
Joined: Sat Jan 18, 2020 5:24 pm

Re: Get FileList on Remote PC via SFTP

Post by MichaelS » Thu Jun 11, 2020 12:13 pm

Is it possible to install the new Version of TSNet on my Ubuntu 18.04 or MacOS System?

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 190
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: Get FileList on Remote PC via SFTP

Post by matthiasr » Sat Jun 13, 2020 5:32 pm

MichaelS wrote:
Thu Jun 11, 2020 12:13 pm
Is it possible to install the new Version of TSNet on my Ubuntu 18.04 or MacOS System?
You could also use the following links to download the complete 1.4.2

If you have a Business license use this link
https://downloads.livecode.com/tsNet/ts ... _1.4.2.zip

If you have an Indy License then use this link
https://downloads.livecode.com/tsNet/ts ... _1.4.2.zip

Please download the correct version for your license. It is not possible to use the Indy version in LC Business ! ! !
Then
1. extract the file
2. If you are on Mac OS X, then open the Livecode bundle (right click on the Livecode...app icon and select "Show package contents" and double click the folder Contents
3 open the folder Ext
3. remove the older folder tsNet_Indy_1.4.1 or tsNet_Business_1.4.1 -- this is important
4. copy the new tsNet_Indy_1.4.2 or tsNet_Business_1.4.2 folder into the Ext folder

MichaelS
Posts: 24
Joined: Sat Jan 18, 2020 5:24 pm

Re: Get FileList on Remote PC via SFTP

Post by MichaelS » Tue Jun 16, 2020 4:44 pm

Hello Matthias,
i followed your Rules and put the new downloaded tsNet_Indy1.4.2 Folder on my Linux opt folder where the EXTensions are located (Ofcouse i removed the old Version). I made a new Standalone of the sample_sync_stack and i have the same result. Upload and Download via sftp is working, get FileList via sftp is not working.

But ...when i use :
put "sftp://pi:Wuppertal2019@192.168.178.31/home/michael/" into Adresse1
put URL Adresse1 into fld "Testausgabe"
i get a detailed file List from my home Folder with Information about write/read Permissions on each file.

I think,from this FileList i can filter the Information i need.

Thank you for helping.

Best Regards
Michael

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 190
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: Get FileList on Remote PC via SFTP

Post by matthiasr » Tue Jun 16, 2020 7:40 pm

But ...when i use :

Code: Select all

put "sftp://pi:Wuppertal2019@192.168.178.31/home/michael/" into Adresse1
put URL Adresse1 into fld "Testausgabe"
i get a detailed file List from my home Folder with Information about write/read Permissions on each file.
You could also use tsNetGet function to get the filelisting.

But anyway. You´ve got it working.

Matthias

Post Reply

Return to “Internet”