Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MGET and subdirectories.

677 views
Skip to first unread message

Per Steinar Iversen

unread,
Jun 3, 1993, 8:40:15 AM6/3/93
to

Usually MultiNet does the right thing, however with FTP there is a problem with
the MGET command, it also picks up the subdirectory files if an "MGET *.*" is
done. Unfortunately these files are of no use after the transfer, this is a
typical instance where PHY.DIR was picked up along with many other useful
files:

$ DIR
%DIRECT-E-OPENIN, error opening VSFYS5$DKB200:[TMP.PHY]*.*;* as input
-RMS-E-FND, ACP file or directory lookup failed
-SYSTEM-W-BADIRECTORY, bad directory file format

Are there any possibilities to *not* pick up the DIR-files with MGET *.* ?
What I really want is the possibility of an "MGET *.*/EXCLUDE=*.DIR".
(Something which just gives a "%RMS-F-SYN, file specification syntax error" at
the moment.) Or, perhaps, if the transfer is done with the "STRU O VMS" mode ,
just never pick up DIR-files? Or do an MKDIR if the directory does not exist
locally already? This last option would seem to be a better alternative
perhaps.

-psi (ive...@vsfys1.fi.uib.no)

Kenneth Adelman

unread,
Jun 3, 1993, 11:17:32 AM6/3/93
to

This is a general problem with the way MGET works in FTP. Basically,
the FTP Client does an NLST command to expand the wildcard into a list
of filenames. Arguably if someone does an "LS *.*" they should see
the .DIR files. Next the FTP client goes and transfers those files
with RETR. The problem is that our FTP server has no way of knowing
if the NLST command is being done because the user typed "ls" or
because the user typed "mget".

Ken

Carl J Lydick

unread,
Jun 3, 1993, 1:39:23 PM6/3/93
to
In article <930603081...@TGV.COM>, ade...@TGV.COM (Kenneth Adelman) writes:
=> $ DIR
=> %DIRECT-E-OPENIN, error opening VSFYS5$DKB200:[TMP.PHY]*.*;* as input
=> -RMS-E-FND, ACP file or directory lookup failed
=> -SYSTEM-W-BADIRECTORY, bad directory file format
=
=> Are there any possibilities to *not* pick up the DIR-files with MGET *.* ?
=> What I really want is the possibility of an "MGET *.*/EXCLUDE=*.DIR".
=> (Something which just gives a "%RMS-F-SYN, file specification syntax error" at
=> the moment.) Or, perhaps, if the transfer is done with the "STRU O VMS" mode ,
=> just never pick up DIR-files? Or do an MKDIR if the directory does not exist
=> locally already? This last option would seem to be a better alternative
=> perhaps.
=
= This is a general problem with the way MGET works in FTP. Basically,
=the FTP Client does an NLST command to expand the wildcard into a list
=of filenames. Arguably if someone does an "LS *.*" they should see
=the .DIR files. Next the FTP client goes and transfers those files
=with RETR. The problem is that our FTP server has no way of knowing
=if the NLST command is being done because the user typed "ls" or
=because the user typed "mget".

So is there any chance you might be willing to add some code to the client that
will do parsing of the names returned by the NLST and use the /EXCLUDE
qualifier to decide not to request transfer of some of the files matching the
argument to /EXCLUDE?
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CA...@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.

Donald L. Nash

unread,
Jun 3, 1993, 3:27:18 PM6/3/93
to
>> Are there any possibilities to *not* pick up the DIR-files with MGET *.* ?
>> What I really want is the possibility of an "MGET *.*/EXCLUDE=*.DIR".
>
> This is a general problem with the way MGET works in FTP. Basically,
>the FTP Client does an NLST command to expand the wildcard into a list
>of filenames. Arguably if someone does an "LS *.*" they should see
>the .DIR files. Next the FTP client goes and transfers those files
>with RETR. The problem is that our FTP server has no way of knowing
>if the NLST command is being done because the user typed "ls" or
>because the user typed "mget".
>
> Ken

True, the server can't tell the difference, but the client can. It can take
the file list it gets from NLST and filter it according to the user's
specifications. If it has successfully negotiated STRU O VMS, then it can
automatically exclude *.DIR, since these will certainly be useless. There
can be a /EXCLUDE qualifier to manually exclude certain files. It should
take a list of files and do wildcard expansion
[i.e. mget *.* /exclude=(*.dir, *.com, mail.mai, junk.txt)]. The wildcard
expansion is tricky. The only approach I can think of which would work
properly is to let the server expand the wildcard by using NLST. This second
invokation of NLST would return a list of files which the client would remove
from the first list. This is a lot of work, requiring an NLST for each
wildcard expansion. Also, /EXCLUDE should be negatable to turn off the
automatic filtering of *.DIR. BTW, automatic filtering of *.DIR can be done
locally, since it only occurs when STRU O VMS is in effect so it is known
that the names returned by NLST will be VMS file names and thus can be parsed
locally and matched against "*.DIR".

While I'm on this subject, a /RECURSIVE qualifier to mget might be nice as
well. It would transfer entire directory trees. However, this would be
rather difficult to do properly. It could be made to work most of the time
when the server is VMS or Unix, but hard links, symbolic links, secondary
file names, etc. would muck things up rather badly.

++Don

George D. Greenwade

unread,
Jun 3, 1993, 5:44:14 PM6/3/93
to
On 3 Jun 1993 17:39:23 GMT, Carl J Lydick <ca...@SOL1.GPS.CALTECH.EDU> posted:

> So is there any chance you might be willing to add some code to the client
> that will do parsing of the names returned by the NLST and use the /EXCLUDE
> qualifier to decide not to request transfer of some of the files matching
> the argument to /EXCLUDE?

And/or a /COMPLETE qualifier (or some other name) which will create the
*.DIR files properly and even allow MGET [...]*.* to get the whole tree?

--George

0 new messages