Some days, I need to send two files, other days, only one. The remote
site sends a warning email if the second file I send is empty. I
would like to avoid that.
I have looked at several web pages, but I am unclear as to how to
create the needed code.
I don't know how to test this as the remote site just grabs files that
are uploaded.
I also don't know if the script can (or how to do it) determine if a
file is essentially empty. First thought was to set an environment
variable based on result of RTV (can't remember which command to use,
but I have used it - just not in front of my terminal)
The current script does this, from memory:
expect "sftp>" put {$LOCALFILE} {$RMTFILE}
expect "sftp>" put {$LCLFILE2} {$RMTFILE2}
expect "sftp>" send "exit\n"
I haven't found an example to conditionally send a file, but I can see
that it can be done. Just don't know the syntax.
Thanks.
John McKee
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.