# File transfer

Receive and send files over SFTP, FTP and SMB, with one API for all of them.

## Get started

A schedule watches a remote directory and your service is called once per file, with the contents already in hand - moving a feed between protocols is a change of connection, not of code.

[Receiving files](https://zato.io/docs/dev/file-transfer/receiving-files.html)

service.py

```
# One API for SFTP and SMB
conn = self.sftp['My SFTP Connection']
conn.upload(local_path, remote_path)
info = conn.get_info(remote_path)

info.size_human
'48.2 KB'

conn.exists(remote_path)
True
```

## Receive and send

[Receiving files What your service is given per file and what happens when it refuses one.](https://zato.io/docs/dev/file-transfer/receiving-files.html) [Connection API Upload, download, list and move files from your own code - every method both protocols offer.](https://zato.io/docs/dev/file-transfer/connection-api.html) [Schedules Which directory to watch, how often to look and which service to hand each file to.](https://zato.io/docs/dev/file-transfer/schedules.html) [Feeds Batch feeds that arrive on somebody else's timetable, handled file by file.](https://zato.io/docs/dev/file-transfer/feeds.html)

## Protocols

[SFTP SFTP connections - authentication, host keys and directories.](https://zato.io/docs/dev/file-transfer/sftp.html) [SMB Windows shares over SMB, with the same API as SFTP.](https://zato.io/docs/dev/file-transfer/smb.html) [FTP Plain FTP and FTPS servers, with the same API as SFTP.](https://zato.io/docs/dev/file-transfer/ftp.html)

## Automation

[Enmasse Define file transfer connections and schedules in enmasse YAML.](https://zato.io/docs/dev/file-transfer/enmasse.html)
