Stefan Monnier writes: >>> I could change ange-ftp to this encoding style of file names; but I am >>> anxious: it could break ange-ftp on other systems, where double quotes >>> might not be supported. > >> Does it help to use shell-quote-argument? > > I doubt it: the FTP command is not passed through a shell. > In some cases it may work, of course. But it is a good approximation. Under GNU/Linux, we have (shell-quote-argument "file name with spaces 'and \"quotes") => "file\\ name\\ with\\ spaces\\ \\'and\\ \\\"quotes" W32 systems do (shell-quote-argument "file name with spaces 'and \"quotes") => "\"file name with spaces 'and \\\"quotes\"" Both quotations work with stock FTP clients except the quotation of "\"" on W32 systems: it shall be "\"\" instead of "\\\"". But this could be adapted, and "\"" isn't so usual on W32 file names. Btw, I could not create the file "~/file name with spaces 'and \"quotes" on W32 in Emacs; this worked only with Emacs under GNU/Linux. Lennart (et al), could you, please, test whether the appended patch works for you for file names with spaces? And that there isn't any other regression? The patch is towards ange-ftp.el in the trunk. > Stefan Best regards, Michael.