ascii - Set FTP transfer type to ASCII

Syntax

ascii(f)

Description

ascii(f) sets the download and upload FTP mode to ASCII, which converts new lines, where f was created using ftp. Use this function for text files only, including HTML pages and Rich Text Format (RTF) files.

Examples

Connect to the MathWorks FTP server, and display the FTP object.

tmw=ftp('ftp.mathworks.com');
disp(tmw)
FTP Object
  host: ftp.mathworks.com
  user: anonymous
   dir: /
  mode: binary

Note that the FTP object defaults to binary mode.

Use the ascii function to set the FTP mode to ASCII, and use the disp function to display the FTP object.

ascii(tmw)
disp(tmw)
FTP Object
  host: ftp.mathworks.com
  user: anonymous
   dir: /
  mode: ascii

Note that the FTP object is now set to ASCII mode.

See Also

ftp, binary

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS