× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Perhaps look into writing something with Python. No expect needed.

Python uses external libraries, primarily Paramiko and the simpler pysftp, to interact with SFTP (Secure File Transfer Protocol) servers. These libraries allow you to securely connect, upload, download, and manage files and directories on remote servers using the SSH protocol for encryption.

Paramiko:
https://docs.paramiko.org/en/stable/api/sftp.html

Pysftp (But apparently dates back to 2016)
https://pypi.org/project/pysftp/

Looks like a new sftputil package was released in early March 2026 as well. I need to check that one out.
http://pypi.org/project/sftputil/

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx

------------------------------

message: 2
date: Mon, 30 Mar 2026 17:17:03 +0200
from: "gio.cot via MIDRANGE-L" <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: How to list a directory with expect via sftp

Hi all

I'm tryto put some file in folder SFTP Server; i would need to test if the transfer is gone ok.

I was thinking to display directory content but i have problem; i have tried with

expect "sftp>"

send "ls -l \\r"

but i receive "write() failed to write anything - will sleep(1) and retry..."



if i try to connect to server via QP2TERM , i receive "Permission denied, please try again."



How can i get this info ??



Or is there anyway after put, to show a log that say xxxx byte transfered ?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.