Previous Thread
Next Thread
Print Thread
Wildcard File Transfer To Host #37105 15 Feb 24 07:35 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Quote
What I am looking for is a way to send a group of files (*.*) from the client to the server.
We would have an ATE connection and I would like to do it without ftp if possible.
ATSYNC seems to be the right idea but in the wrong direction.

In the case of a Linux host (or if the host has FTP), then ZTXFER would work, i.e.
Code
.ZTXFER = C:\some\path\*.*

But in the case of ATE to a Windows host, where an FTP server is typically not available, ZTXFER reverts to using ATEAPX, which uses MX_ATEFILEXFR to retrieve files from the client via the keyboard channel. But it operates on just one file at a time, and needs an explicit file specification for the source file. So we need some way to get the list of client files matching a wildcard spec and transfer it to the application on the server so it can request those files to be transferred one by one.

Unfortunately we don't seem to have a built-in ATE command to do that. (Note that FTP/SFTP doesn't have this limitation because the ability to query the remote system directory is part of the FTP/SFTP protocol.) But it could certainly be implemented via a client-side SBX invoked from the server. The SBX would process the wildcard spec, probably creating list-file containing the matching filespecs, and then return that to the server, which would then be able to use ATEAPX on each one. The trickiest part of the operation is replicating the SBX from the server to the client and then redirecting the call there, but there is a handy utility function in FNATESBX.BSI (in the SOSLIB) that takes care of all the dirty work.

Perhaps someone out there has already created such an SBX?

Re: Wildcard File Transfer To Host [Re: Jack McGregor] #37106 15 Feb 24 08:10 PM
Joined: Jul 2001
Posts: 453
J
Joe Leibel Offline
Member
Offline
Member
J
Joined: Jul 2001
Posts: 453
If ftp were turned on on the windows server then would your example work? ZTXFER = C:\path\*.*

Re: Wildcard File Transfer To Host [Re: Jack McGregor] #37107 15 Feb 24 08:32 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I think so, although I haven’t recently tested that except with SFTP /Linux. Note an additional complication in Windows is that the FTP server is almost certainly going to be ‘homed’ to some specific directory tree, which might make it difficult for the client to access the directory you’re running from on the server.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3