|
You didn't
expect
anything before
send "cd $REMOTE_DIR\r"
________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of gio.cot via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Sent: Tuesday, March 31, 2026 14:52
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: RE: How to list a directory with expect via sftp
Hi
I have changed my scritp in:
#!/usr/local/bin/expect -f
set REMOTE_DIR "/cert_xxxx_name/in"
spawn sftp cert_xxxx_name@xxxxxxxxxxxxx
expect "Password:"
send "mypsw\n"
# position
send "cd $REMOTE_DIR\r"
Jack WoehrIndependent Consulting Programmer 303-847-8442 jack.woehr@xxxxxxxxxxx www.procern.com Stay Connected!Upgrade your IT state of mind!NON-DISCLOSURE NOTICE: This communication including any and all attachments is for the intended recipient(s) only and may contain confidential and privileged information. If you are not the intended recipient of this communication, any disclosure, copying further distribution or use of this communication is prohibited. If you received this communication in error, please contact the sender and delete/destroy all copies of this communication immediately.
As an Amazon Associate we earn from qualifying purchases.
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.