home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1998 July / apc37.iso / netkit / mac / dcomet / dcomet.hqx / Documents / 6. File Transfer < prev    next >
Encoding:
Text File  |  1998-01-29  |  23.1 KB  |  340 lines

  1.  
  2.   
  3.                          6. File Transfer
  4.   
  5. _____________________________________________________________________________
  6.   
  7.       dataComet documentation.  (Rev. 11/20/97) 
  8.       Copyright 1997 databeast, Inc. All Rights Reserved.
  9.   
  10.    This document has information on (select and use "Find..." to go to the section):
  11.   
  12.          File transfer overview
  13.          Using Z-Modem
  14.          AutoLaunch and Internet Config "File Mappings" 
  15.          File transfer general items
  16.          File transfer menu options
  17.          File transfer dialog options
  18.              "Download":  Options affecting downloads
  19.              "Upload":  Options affecting uploads.
  20.              "Default Protocol"
  21.              "X/Y-Modem options"
  22.              "Z-Modem options"
  23.          File transfer progress dialog
  24.          File transfer using TFTP
  25.          File transfer with IBM hosts using FT3270
  26.  
  27.   
  28.   
  29.        ___________________________________________________
  30.  
  31.          File transfer overview
  32.        ___________________________________________________
  33.  
  34.    The folder in which the session document is located is the default folder for up- and down-loading, unless "Comet Default" is the document being used, in which case the default download folder is the application's home directory.  To switch folders  you can use the File menu commands "Set download directory" or "Type file name at cursor" (the latter also inserts a file name at the cursor position).  These commands use the standard file interface.  When you create a new file by saving text or downloading a file, the file is set by default to be a dataComet document; you can cause files to be saved with a different document type by using the "Set default file type..." dialog before you save or download the file.  Alternatively, when Z-Modem downloads are performed, the type may be set using MacBinary or BinHex document information, or Internet Config may be used to map file extensions to a document creator.
  35.  
  36.    When files are downloaded, dataComet checks the file name, and processes filenames with certain suffixes in special ways.  (The suffix is the portion of a filename at the end which is  preceded by a '.')  These suffixes are:
  37.  
  38.       ".print":  Print the file after it is downloaded, presenting 
  39.           the standard Print dialog.
  40.  
  41.       ".print.nodialog":  Print the file without presenting the dialog.
  42.  
  43.       ".print.delete":  Print the file and delete it after printing.
  44.  
  45.       ".print.nodialog.delete":  Print the file without a dialog and 
  46.           delete it after printing.
  47.  
  48.       ".rename":  Offers the user a chance to rename the file.
  49.  
  50.       ".edit":  When you do a file download to a file with the same
  51.           name as a session's .edit window, the downloaded text will be
  52.           automatically appended to the window.  Likewise, an upload using 
  53.           a session's .edit window name will cause dataComet to save the .edit
  54.           window before the upload is performed.  (E.g., this is performed
  55.           when a session is named "theory", and you download a file named
  56.           "theory.edit".)   You can automatically add or delete  carriage
  57.           returns in your text using options in the "Control Session..."
  58.           dialog, so that you can more conveniently use the TextEdit text
  59.           wrapping on your Mac and have the paragraphs reformatted properly
  60.           for your host.
  61.  
  62.           AutoLaunch and automatic wrapping options in the "Control File 
  63.           Transfer" dialog provide an alternative to using the ".edit" 
  64.           feature when Z-Modem is used for file transfer.
  65.  
  66.           When using Z-Modem, filenames ending in ".bin" and ".hqx" will
  67.           be decoded using MacBinary and BinHex protocols, respectively.
  68.  
  69.  
  70.        ___________________________________________________
  71.  
  72.          Using Z-Modem
  73.        ___________________________________________________
  74.  
  75.    If you're doing file transfers, Z-Modem is the best protocol to use if it is available on your host.  Here are some suggestions for using Z-Modem with dataComet with its default settings for file transfer...
  76.  
  77.    To download text files using dataComet's Z-Modem, you can use 
  78.  
  79.       sz mytextfile
  80.  
  81. without specifying the '-a' to transmit text files, since by default newlines are automatically converted to Macintosh CR format (see below for the dialog option which allows you to change this setting).
  82.  
  83.    To download a file which is a binary when this automatic text translation option is on, you can use 
  84.  
  85.       sz -b mybinaryfile
  86.  
  87. which will turn off the text translation option.
  88.  
  89.    When the download has completed, dataComet will convert MacBinary (.bin) and BinHex files (.hqx), and then AutoLaunch the resulting document with the selected helper application.  
  90.  
  91.    You can use the "Upload..." menu item (Command-U) to select a file or folder to upload; the "rz" command will be automatically run on the host (you can hold down the Option key to suppress automatic "rz" command invocation).
  92.  
  93.    If you use the "Upload..." command when a dataComet edit window is frontmost, the edit window will be saved and uploaded to the next frontmost host session.  (Note that this is not the case if this is a session's .edit window, in which case the dialog is still displayed).
  94.  
  95.    NOTE that only one serial file transfer can be executed at a time.  You can still do work in other windows during a file transfer, including emulator sessions, but you cannot perform serial downloads using another session until the current file transfer is complete.
  96.  
  97.        ___________________________________________________
  98.  
  99.          AutoLaunch and Internet Config "File Mappings" 
  100.        ___________________________________________________
  101.  
  102.    If Internet Config is installed and IC suffix-file mappings are enabled, binary mode will be selected automatically for both uploads and downloads according to the settings in the Internet Config "File Mappings"--i.e., the "Binary" setting and "Not for incoming"/"Not for outgoing" settings for that file type.  
  103.  
  104.    For IC downloads the document's file type and creator are set to those specified for the file's extension in the Internet Config "File Mappings" (e.g., ".doc" is set as an MSWord document; ".txt" is set as a SimpleText document).
  105.  
  106.    For IC uploads filenames have appropriate extensions (e.g., ".jpg") added automatically.  This is off by default.
  107.  
  108.    You can change the Internet Config "File Mappings" by selecting the "Control Internet Config..." to open Internet Config, and then select the "File Mappings" icon to change the settings to use the applications you prefer.
  109.  
  110.    If Internet Config is NOT installed, MacBinary and BinHex files are set to the type and creator specified in the original document.  Text files are set to type 'TEXT', using the creator you're specified for this session in the File menu item "Set default file type...".  Files containing a ".sit" extension will be opened using StuffIt Expander.
  111.  
  112.    AutoLaunch and Internet Config File Mappings are not yet supported for FT3270 file transfers.
  113.  
  114.        ___________________________________________________
  115.  
  116.          File transfer general items
  117.        ___________________________________________________
  118.  
  119.    "Type file name at cursor╔":  Brings up a directory dialog box for you to select a file whose name you want to type on the dataComet screen.  The download directory is set to the last directory you use.
  120.  
  121.  
  122.        ___________________________________________________
  123.  
  124.          File transfer menu options
  125.        ___________________________________________________
  126.  
  127.    "AutoReceive":  Scans incoming data from the host for the Z-Modem string which prefaces a download, and automatically accepts the file, so that you don't need to execute a "Download" menu item after entering the host command "sz filename".
  128.  
  129.    "AutoLaunch":  Automatically launch files which have been successfully downloaded.  If Internet Config is installed and IC download file mapping is enabled, dataComet opens the document using the application set in the "File Mappings" dialog for file suffixes (e.g., ".jpg" will launch JPEGView).
  130.  
  131.    "Upload╔":  Presents a dialog to select a document to upload using the default file transfer Protocol selected in the "File Transfer" dialog.  If the current window is an edit window, the edit document is saved and uploaded automatically without a dialog.  If Internet Config is installed, dataComet appends file suffixes appropriate for that document (e.g., SimpleText documents will have ".txt" appended).  The "rz" or "rx" program is automatically invoked on the host, with appropriate parameters depending upon whether the file is a text or binary file.  (To avoid automatic host program invocation, you can use "Option-Upload"; you will then need to type the host command yourself).
  132.  
  133.    Uploading folders:  When Z-Modem is used, you can upload all the documents in a folder using the "Upload..." dialog by clicking on the "Transmit" button with the mouse (pressing the Return key when a document is selected will upload the document; for folders, however, pressing the Return key opens the folder rather than uploading it).  To make maintaining remote directories quick and easy, Z-Modem "Newer" mode is set for folder uploads, so existing files are uploaded only if they are updated versions.
  134.  
  135.    To guarantee that a file is uploaded even when it's not newer, you can upload only one document at a time; for single documents dataComet Z-Modem uploads always overwrite the destination file.
  136.  
  137.    NOTE that after uploading a file to a host, you may need to change file permissions in order to make a file publically accessible if the file is part of a web page or is to be retrieved from an FTP server.  (E.g., under UNIX the file permissions need to be set using "chmod 644 filename"; likewise new directories may need to be made readable using "chmod 755 directoryname".  Other operating systems have similar security features, so if network file accesses fail check the permissions on the file or directory.)
  138.  
  139.    "Download╔":  Accepts a download from the host using the default protocol.  
  140.  
  141.    "Compuserve QuickB╔":  NOT SUPPORTED IN 4.50B1.  Presents a dialog to perform a QuickB file transfer.  
  142.  
  143.    "X-Modem Upload", "X-Download":  Performs an upload or download using X-Modem rather than the default protocol.
  144.  
  145.    "Y-Modem Upload", "Y-Download":  Performs an upload or download using Y-Modem rather than the default protocol.
  146.  
  147.    "Z-Modem Upload", "Z-Download":  Performs an upload or download using Z-Modem rather than the default protocol.
  148.  
  149.  
  150.        ___________________________________________________
  151.  
  152.          File transfer dialog options
  153.        ___________________________________________________
  154.  
  155.    "Folder":  Selects a target folder for down-loading.  This is automatically saved as a string in the session document.
  156.  
  157.    "Translate TEXT":  Enables translation of characters from the Macintosh character set to host character set and vice versa, using the table selected for the session with the "Control Translation" menu.  
  158.  
  159.           _____________________________________________
  160.           
  161.              "Download":  Options affecting downloads
  162.           _____________________________________________
  163.           
  164.  
  165.    "AutoReceive":  Automatically receive Z-Modem downloads.  
  166.  
  167.    "AutoLaunch":  Automatically launch a downloaded document after performing MacBinary or BinHex decoding.  The "File Mappings" settings from Internet Config are used if IC has been installed.  E.g., if you download a correctly-named GIF file, "whatever.gif", the GIF image will automatically be displayed by JPEGView; if you download "index.html", the web page will be displayed by your browser (assuming that Internet Config itself is correctly configured... you can use dataComet's "Control Internet Config..." command to open Internet Config and change the "File Mappings" if this doesn't work or you wish to select alternative helper applications).
  168.  
  169.    "CR/LF -> CR":  Automatically detect and convert text files to Macintosh format.  DOS uses CR/LF pairs, and UNIX uses LF (LineFeed) characters to indicate the end of a line rather than a single CR (Carriage Return), which is used on the Mac to start a new line.  This is on by default.
  170.  
  171.    "UnWrap ª":  Automatically unwrap downloaded text files into Mac TEXT format (Carriage Returns appear only at the end of paragraphs; CRs or LFs denoting the end of lines are stripped).
  172.  
  173.    "IC Suffix -> Type":  Turns on Internet Config suffix mapping on downloads, so that file types are derived from the IC "File Mappings" settings, rather than the options below:
  174.  
  175.       "TEXT App":  The default helper application for TEXT files 
  176.                        when IC is not used.
  177.  
  178.       "BIN App":  The default helper application for BINARY files
  179.                        when IC is not used.
  180.  
  181.       "BIN Type":  The default file type for BINARY files
  182.                        when IC is not used.
  183.  
  184.  
  185.  
  186.           _____________________________________________
  187.           
  188.              "Upload":  Options affecting uploads.
  189.           _____________________________________________
  190.           
  191.    "MacBinary":  Use MacBinary protocol to encode files when uploading.  This preserves a document as a Macintosh format file.
  192.  
  193.    "BinHex":  Use BinHex protocol when uploading.  MacBinary takes precedence over BinHex if it is also selected.  This preserves a document as a Macintosh format file; BinHex is less efficient than MacBinary, however, files encoded using BinHex can be transferred over connections which can only transmit 7-bit characters, so it is still the standard for the distribution of binary files.
  194.  
  195.    "Encode TEXT":  Encodes 'TEXT' documents when uploading, in addition to other documents, which are always encoded when MacBinary or BinHex is selected.
  196.  
  197.    "Wrap @" ______:  Wraps outgoing TEXT at the specified column.  
  198.  
  199.    "IC Type -> Suffix":  Toggles Internet Config suffix mapping on uploads, so that file suffixes are derived from the IC "File Mappings" type/creator settings, rather than:
  200.  
  201.       "TEXT suffix":  A suffix which is appended to uploaded TEXT files
  202.                       when IC is not used.
  203.  
  204.  
  205.           _____________________________________________
  206.           
  207.              "Default Protocol"
  208.           _____________________________________________
  209.  
  210.    "CompuServe Quick-B", "X/Y-Modem", "Z-Modem":  Selects a default protocol to use for serial file transfer.  Quick-B supercedes the other protocols when selected; the other controls toggle between X/Y-Modem and Z-Modem.
  211.  
  212.    "Options":  Brings up a dialog which allows you to fine-tune X/Y/Z-Modem settings...
  213.  
  214.           _____________________________________________
  215.           
  216.              "X/Y-Modem options"
  217.           _____________________________________________
  218.  
  219.    "1K":  "off", "auto", "CK":  Selects the packet size (128 vs. 1024 bytes/packet).
  220.  
  221.    "Batch":  "off", "Y", "RR":  Selects Y-Modem batch mode.  "RR" is supposed to be compatible with the "Red Ryder" (a/k/a "White Knight") implementation of Y-Modem.
  222.  
  223.    "Timeout":  "0", "5", "10", "15":  Selects a timeout value in seconds (default 10).
  224.  
  225.    "Use CRC":  Use a CRC (Cyclical Redundancy Check) to ensure that data is not garbled in transmission.
  226.  
  227.           _____________________________________________
  228.           
  229.              "Z-Modem options"
  230.           _____________________________________________
  231.           
  232.    "Timeout (seconds)":  Number of seconds to wait before performing a retry (default 10).
  233.  
  234.    "Maximum retries":  Number of retries to perform before giving up on a file transfer (default 10).
  235.  
  236.    "Receive Buffer size":  Allows you to specify the size of the buffer; zero is the default, which automatically selects a size appropriate to the type of connection.
  237.  
  238.          "Transmit:"  The following options affect Uploads.
  239.  
  240.    "Sub-packet length":  Allows you to limit the size of sub-packets to help compensate for bad connections (default 1024).  You should use a shorter sub-packet length if you find that transfers are performing numerous retries due to errors.
  241.  
  242.    "Window limit":  Allows you to set a limit on how many bytes are sent to the receiving end at one time (default 0, which implies that the receiving).
  243.  
  244.    "ZCRCQ spacing":  Allows you to require periodic ZAKS (acknowledgments that data has been received) from the receiving end (default 0, which implies that ZAKS are not required).
  245.  
  246.    "Escape all control characters":  Allows you to escape all control characters over connections which use them for connection control purposes.  Try this if you find that connections fail mysteriously.
  247.  
  248.        ___________________________________________________
  249.  
  250.          File transfer progress dialog
  251.        ___________________________________________________
  252.  
  253.    "Total":  The total number of bytes in the file to be transferred.
  254.  
  255.    "Done":  The number of bytes transferred.
  256.  
  257.    "Remaining":  The number of bytes remaining to transfer.
  258.  
  259.    "Bytes/sec":  An estimate of the number of bytes per second transferred.
  260.  
  261.    "Blocksize:":  The Z-Modem block size (or in X-Modem, the block number).
  262.  
  263.    "Errors":  The number of errors seen transmitting the current packet.
  264.  
  265.    "Time":  Beneath this label the "Time Done" is displayed to show the total elapsed time for the file transfer.  Further down the "Time Remaining" is displayed to provide an estimate of how much time remains before the transfer is completed.
  266.  
  267.    Transfer labels:
  268.  
  269.          "BinHex":  The file being transferred is a BinHex file, 
  270.                     downloaded files will be decoded automatically.        
  271.     "MacBinary I":  
  272.    "MacBinary II":  The file is a MacBinary file; downloaded files
  273.                     will be decoded automatically.
  274.        "CR -> NL":  The TEXT file being uploaded is being converted.
  275.        "NL -> CR":  The TEXT file being downloaded is being converted.
  276.            "Wrap":  The TEXT file being transferred is having its lines
  277.                     wrapped to or from Macintosh format.
  278.          "Launch":  The downloaded file will be opened automatically.
  279.  
  280.  
  281.    Z-Modem States:
  282.  
  283.          "ZRINIT":  A file download is being negotiated. 
  284.      "ZCHALLENGE":  Responding to file download request.
  285.         "ZRQINIT":  A file download is being requested.
  286.          "->ZNAK":  A ZNAK has been sent to request a packet resend.
  287.     "ZFILE error":  An error occurred transmitting a File header.
  288.       "ZSINIT ok":  File upload negotiation OK.
  289.    "ZSINIT error":  An error occurred negotiating an upload.
  290.        "ZFREECNT":  The space available on your disk was requested.
  291.        "hdr-ZNAK":  A ZNAK has been sent to request a header resend.
  292.       "hdr-ZFILE":  A File transfer Name/Header is being transmitted.
  293.        "hdr-ZEOF":  The End-Of-File for a transfer has been seen.
  294.       "hdr-ZSKIP":  The receiver wants to skip the file.
  295.       "hdr-ZDATA":  Data transmission is starting.
  296.    "data-TIMEOUT":  A timeout has occurred while waiting for data.
  297.      "data-ERROR":  An error occurred receiving a data packet.
  298.      "data-ZCRCW":  A data packet was received with a frame end and
  299.                        an ACK request.
  300.      "data-ZCRCQ":  A data packet was received with an ACK request.
  301.      "data-ZCRCG":  A data packet was received.
  302.      "data-ZCRCE":  A data packet was received with a frame end.  
  303.     "hdr-TIMEOUT":  A timeout has occurred while trying to transmit 
  304.                        a header.
  305.       "hdr-ERROR":  An error has occurred while trying to transmit 
  306.                        a header.
  307.  
  308.        ___________________________________________________
  309.  
  310.          File transfer using TFTP
  311.        ___________________________________________________
  312.  
  313.    dataComet includes a TFTP file transfer server, so the TFTP file transfer protocol can also be used to transfer files with any host which runs the TCP/IP protocols.  
  314.  
  315.    To use TFTP (the Trivial File Transfer Protocol) to exchange files with a UNIX (or other) host while running dataComet, you must connect to the host and run TFTP on the host.  First, however, you must enable dataComet TFTP transfers by turning on the "TFTP Server on" item in the "Global..." dialog under the "Control" menu.  PLEASE NOTE that if you turn off server asking, you are exposing your files to other users on the network, and that hostile users could delete or replace crucial files on your system, so use this option with care.
  316.  
  317.    While connected to the host, enter the command "tftp" and type Return to execute the host's TFTP application.  When the host TFTP responds with a prompt, type "connect ", and use the "Type my address at cursor" command in the "Telnet" menu to enter your address on the command line.  Now you are ready to transfer a file.
  318.  
  319.    To transfer text files you will need to put the host TFTP into "netascii" mode by giving the host TFTP the command "mode ascii", which will guarantee that newlines are interpreted properly.  (The "mode binary" command can be used to transfer files literally--"image", or "octet" modes may also be available; these are just different names for binary mode.)  
  320.  
  321.    You can then use the "put" and "get" commands to transfer files from your current directory (one at a time only, e.g. "put myfile hd/download/myfile"--the slashes will be translated into colons for the Macintosh on the Mac end.)  If you want to disable the Alert box that asks you whether a file transfer is OK, you can turn off the "Request approval of TFTP transfers" item in the "Global" dialog in the Control menu.  You can also disable the TFTP server, for security's sake, by using the "TFTP server on" menu item.
  322.  
  323.    When you're finished, typing "quit" and a Return will exit TFTP.
  324.  
  325.        ___________________________________________________
  326.  
  327.          File transfer with IBM hosts using FT3270
  328.        ___________________________________________________
  329.  
  330.    The FT3270 file transfer protocol can also be used to transfer files between the Macintosh and an IBM mainframe.  To perform a file download, log on to the IBM host, and use the command "exec download".  To upload, use "exec upload".  If you try these commands without file names, you will be shown a help screen.  The file name needs to be surrounded by quotation marks to handle the case where the filename contains blanks.  (Note that if you have not set TERMINAL ESC OFF or otherwise changed your escape character from '"', the up- or down-load program will not receive the command-line correctly.)
  331.  
  332.    Files may be transferred in either "text" or "binary" mode.  In "text" mode characters are translated between IBM's EBCDIC character encoding and ASCII character encoding using the same translate tables as KERMIT, and translation of Carriage Returns is handled as appropriate for the Macintosh.  In binary mode bytes are transferred without translation.  
  333.  
  334. Syntax:
  335.    DOWNLOAD filename filetype <vol <filename | "file name">> <(<REPlace><BINary>>
  336.    UPLOAD <filename | "file name"> <filename <filetype <vol>>> <(<REPlace> <BINary>> 
  337.  
  338.    The default volume on the host is your A disk.  The default directory on the microcomputer is the directory from which the application was launched.  The default microcomputer target filename for downloading is "filename.filetype"; uploading reverses this default name mapping, so "filename.type" becomes "filename filetype a".  Slashes in the microcomputer filename are interpreted at the Macintosh end as colons, so they function as directory path specifiers.  On the Macintosh file system, you need to place a colon before a path name to specify the current directory; additional leading colons specify parent directories.  If a Macintosh file name has spaces in it, enclose the name in quotation marks.
  339.  
  340.