sftp client - standard output, filename getting truncated


Author
Message
emalinis
emalinis
Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)Forum Guru (61 reputation)
Group: Forum Members
Posts: 7, Visits: 17
Hi, we are currently using the sftp.exe client to transfer files to an sFTP server. We invoke this process using PowerShell's 'Start-Process' cmdlet in order to redirect the standard output (stdout) to a file with the '-RedirectStandardOutput' option of Start-Process. For example (in PowerShell console)..

> Start-Process -PassThru -Wait -NoNewWindow -Filepath "sftp.exe" -ArgumentList "..our_sftp_connection_and_batch_parameters.." -RedirectStandardOutput "drive:\path_to_file\sftpStdOut.log"

The above all works fine and the file transfers complete as expected. In the sftpStdOut.log file, what we see during the transmission are lines (for example) such as the following...
:
filename_and_ext_of_file_being_transferred 73% 896KB 122.0KB/s 00:02 ETA
filename_and_ext_of_file_being_transferred 83% 1024KB 122.6KB/s 00:01 ETA
filename_and_ext_of_file_being_transferred 91% 1120KB 120.0KB/s 00:00 ETA
filename_and_ext_of_file_being_transferred 99% 1216KB 117.6KB/s 00:00 ETA
filename_and_ext_of_file_being_transferred 100% 1226KB 94.3KB/s 00:13
:

We also tail the above stdout file to monitor the progress of the file transfers, as well as giving us metrics of how the sFTP transmission went.

The issue:
In the above stdout logging, the "filename_and_ext_of_file_being_transferred" appears to be limited to only the left-most *45* characters. If the filename/ext of the file being transmitted happens to be >45 chars, then the right-most characters of the filename is *truncated*. And unfortunately, we do have filenames that we transmit which are longer than 45 chars.

Note that the issue should be similar, if not identical, even if the standard output of sftp.exe was just going to the CMD console (at least we have no reason to believe the filenames wouldn't be truncated there as well).

So.. how can we get the stdout logging above being done by the sftp.exe client to display >45 chars, or ideally the *full* filename and extension regardless of how long it might be?

We have fully-licensed copy of Pragma software. "About Pragma FortressCL" dialog window displays our installed version as: "Version: 5.0 Build 9 Revision 2904".

Thanx in advance!

Beth Redd
Beth Redd
Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)Pragmateer (789 reputation)
Group: Administrators
Posts: 81, Visits: 180
Hello,

Unfortunately, the output you are getting is our progress meter and it is limited to 80 characters, the default window size.

I will discuss this issue with the development team and we'll see if we can implement a way for you to get a full file listing.


Beth Redd
Technical Support Group...
Technical Support Group (TSG)
Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)
Group: Moderators
Posts: 136, Visits: 639
bethredd - 3/29/2018 12:33:16 PM
Hello,Unfortunately, the output you are getting is our progress meter and it is limited to 80 characters, the default window size. I will discuss this issue with the development team and we'll see if we can implement a way for you to get a full file listing.

We have corrected this issue, so that if the sftp client is redirected, all output is provided without truncating any of the progress information. It will be part of the next release.

Pragma Systems Technical Support
13809 Research Blvd, #675
Austin, TX 78750
http://www.pragmasys.com
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search