help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTP to MS ftp server


From: Yuri Khan
Subject: Re: FTP to MS ftp server
Date: Thu, 4 Apr 2013 13:20:40 +0700

On Wed, Apr 3, 2013 at 10:54 PM, Guido Van Hoecke <guivho@gmail.com> wrote:

> As far as I know, there's only one MS-DOS format, and luckily, it is
> occurring less frequently that the UNIX format.

There is not only one DOS format. DOS versions earlier than Windows 95
had no notion of long file names, and so their listings displayed the
file names in the leftmost column; with long file names, the file
names moved to the right.

Also, the sizes come separated with the locale-specific thousand (or,
rather, digit group) separator, which can vary considerably. The dates
and times are formatted in the locale-specific formats, with their
associated component orders, digit counts and separators. In the case
of Windows, the locale that is used is most often the one that the
system was initially installed with; it bears strong correlation with
the country of deployment because of pricing policies.

UNIX listings also have these locale-related problems, with an added
twist that the UNIX listing sometimes conserves space by showing
either modification time or the modification year.

This variability is what makes human-oriented listings ultimately
unparseable in the general case.

> Microsoft explains how
> users of their servers can choose either format:
> http://www.iis.net/configreference/system.applicationhost/sites/sitedefaults/ftpserver/directorybrowse

So have you tried convincing the administrators of servers you need to
work with to switch to the UNIX format?

> So again, I would be happy if Emacs would grok this MS-DOS format.

I am not very well versed in Emacs’s implementation of FTP; a cursory
reading suggests that it is handled by the ange-ftp module which has
code to deal with VMS, MTS, CMS and BS2000 listings. You might be able
to implement DOS listing parsing (or have it implemented for you) by
following those as examples. In case you are not doing it yourself,
you will need to provide the implementor with access to a suitable
server.

(I certainly won’t undertake such a task, as it’s my deep belief that
parsing human-readable FTP listings is a dirty hack and the only
proper way is to use the MLSD command and persuade everybody to
replace their old servers with those that implement MLSD. Better yet,
drop FTP altogether in favor of a protocol originally designed for
machines, not humans.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]