$ 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)
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
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.
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
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