====== File transfers and logging ====== ===== Zmodem ===== When a BBS or a shell (''sz file'') starts a Zmodem download, Lantern receives it automatically into the session's **File Transfer → Download directory**, with a progress window showing the file, size, speed and time, and a **Cancel transfer** button. If a file of that name already exists, the download is saved as ''name (1).ext'' (or overwrites, or is skipped, under **Zmodem download of an existing file**). Files are written as ''name.part'' and renamed when complete; a cancelled or failed download leaves nothing behind and never touches existing files. To upload, start the BBS's Zmodem upload (or ''rz''): Lantern asks which files to send. You can also choose them first with **Transfer → Zmodem upload…**; they are sent as soon as the host is ready. **Transfer → Cancel Zmodem transfer** stops a transfer and returns to the terminal. Typing is ignored while a transfer runs. Turn the automatic start off with **File Transfer → Disable Zmodem**. Zmodem has been tested over Telnet (in binary mode) and raw TCP; RLogin and SSH sessions use the same code but have not been tested with it yet. ===== Xmodem, Ymodem and Kermit ===== The Transfer menu has **Xmodem send…**, **Xmodem-1K send…**, **Xmodem receive…** (you choose the file name, as Xmodem sends none), **Ymodem send…** and **Ymodem receive** (several files, with names and sizes), and **Kermit send…** and **Kermit receive**. Start the host's matching receive or send first (for example ''rx'', ''sx'', ''rb'', ''sb'', or ''kermit -r'' / ''kermit -s''), then choose the menu item. Kermit downloads start by themselves when the host's Kermit begins sending (turn this off under **File Transfer → Start Kermit downloads automatically**). Downloads go to the download directory and follow the Zmodem "existing file" setting. ===== SFTP Browser ===== **SFTP Browser** (Transfer menu or F7, or right-click an SSH session or tab) shows this computer on the left and the server on the right. Select files and folders and press **Upload >>** or **<< Download**, double-click a file to copy it across, or drop files from your file manager onto the window. Each side has **New Folder**, **Rename**, **Delete** (deleting on this computer asks first and is permanent) and **Refresh**; the server side also has **Permissions…**. If a transfer stops, the partial file is kept as ''name.part''; copying the same file again continues where it stopped, as long as the original has not changed. Transfers keep the modification time, and uploads from Linux keep the file's permissions. Downloads start in the session's download directory. ===== SFTP terminal ===== Open an SFTP terminal from an SSH tab. Its interactive client supports ''help'', ''ls'', ''cd'', ''lcd'', ''pwd'', ''get'', ''put'', recursive transfers, permissions and filename completion. Quote paths containing spaces. Use the Transfer menu for SFTP uploads or terminal text/binary sends. Start, pause/resume and stop logs through File. Session Properties controls raw/text mode, filename templates, append, timestamps, line prefixes and rotation. ''%Y/%M/%D'' are date, ''%h/%m/%s'' are time, ''%H'' host and ''%S'' session. Raw logs preserve received bytes; text logs filter terminal escape sequences. Logging failures are reported without closing the connection. The optional TFTP server starts only when chosen in Transfer. Configure upload/download roots, UDP port, overwrite and client-address restrictions in Global Settings. Use octet transfer mode. It rejects paths outside its configured roots. [[lanternterminal:start|Back to Lantern Terminal]]