Thank you all for those great suggestions! Quite clever - I can discuss with our partner.

Brad - I thought about listing the files, but I'm not sure how to incorporate that into an SFTP script sitting on the IFS. For FTP, I use Scott's FTP API where I list the files, get/delete them one-at-a-time.
I guess I could create a second script on the IFS containing each filename and run that script?

I just spoke with Fortra regarding GoAnywhere.

Thanks ALL!


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Greg Wilburn
Sent: Thursday, January 8, 2026 4:18 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] SFTP client

We are doing an increasing number of data exchanges using SFTP... I have been using the OpenSSH and scripting to accomplish this. However, we recently ran into issues where our script may have inadvertently deleted files.

The script runs "get *.csv" followed by "rm *.csv".

We think that the other party was uploading files at the same time I was downloading (several hundred or more files). So I'm looking for some way (or something) to better manage this for me.

TIA,
Greg
[Logo]<https://www.totalbizfulfillment.com/> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.




[CAUTION! This email originated outside of the organization. Please do not open attachments or click links from an unknown or suspicious origin.]


Greg Wilburn
Director of IT
301.895.3792 ext. 1231

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.