[◂ Back to examples](https://zato.io/docs/dev/index.html)

/

# Integrate file feeds with your systems

Pick up files from SFTP, FTP and SMB servers on a schedule, hand each one to a Python service, and connect batch feeds to the databases, queues and APIs that need them.

[Downloads](https://zato.io/docs/admin/guide/install/index.html)

## Tutorials

[### In-depth API integration tutorial Learn how to design and build scalable, real-world, production-ready integrations in Python](https://zato.io/tutorials/main/01.html) [### Modern REST API tutorial How to design, build and secure REST APIs, and how to offer services to API clients](https://zato.io/tutorials/rest-api/python.html) [### EDIFACT healthcare messaging A worked integration where interchange files arrive over a file transfer and leave as typed messages](https://zato.io/tutorials/healthcare/edifact.html)

## How to use the file transfer integration

[Configure an outgoing SFTP connection](https://zato.io/docs/dev/file-transfer/sftp.html) [Configure an outgoing SMB connection](https://zato.io/docs/dev/file-transfer/smb.html) [Set up a schedule that watches a directory for you](https://zato.io/docs/dev/file-transfer/schedules.html) [Write the service that receives each file](https://zato.io/docs/dev/file-transfer/receiving-files.html) [Upload, download and manage files from your own code](https://zato.io/docs/dev/file-transfer/connection-api.html)

## More examples

[### File transfer in Zato The two protocols, the two ways to drive them, and which one to reach for](https://zato.io/docs/dev/file-transfer/index.html) [### Outgoing SFTP connections Address, credentials, private keys through environment variables and host key checking](https://zato.io/docs/dev/file-transfer/sftp.html) [### Outgoing SMB connections Host, port, credentials and share-rooted remote paths](https://zato.io/docs/dev/file-transfer/smb.html) [### The connection API One API for both protocols - upload, download, read, write, list and manage remote entries](https://zato.io/docs/dev/file-transfer/connection-api.html) [### File transfer schedules Watch a directory, decide when a file is complete, and pass it to a service](https://zato.io/docs/dev/file-transfer/schedules.html) [### Receiving files in a service What each invocation delivers and what happens when your service refuses a file](https://zato.io/docs/dev/file-transfer/receiving-files.html) [### Real-world feeds Partner drops with marker files, slow uploads, competing consumers and daily batches](https://zato.io/docs/dev/file-transfer/feeds.html) [### File transfer in enmasse Keep connections and their schedules in YAML under version control](https://zato.io/docs/dev/file-transfer/enmasse.html) [### Data mapping Parse the contents of a file into models and convert between formats](https://zato.io/docs/dev/rest/data-mapping.html) [### Data models Describe the structure of a file's contents with Python dataclasses](https://zato.io/docs/dev/model/index.html) [### Configuration Where to keep directories, patterns and environment-specific settings](https://zato.io/docs/dev/examples/config.html)

## About file transfer

Files are still how a great many organizations exchange data with each other. Banks send settlement files, retailers send stock and price lists, hospitals send interchange files, and payroll, logistics and government systems all trade fixed-width and delimited files on timetables that have been in place for decades. Zato connects to the SFTP, FTP and SMB servers that host those feeds, watches the directories they arrive in, and passes each file to a Python service that can validate it, transform it and pass it on to a database, a queue, an API or another file server. The result is that a batch feed becomes an integration like any other, with the same services, the same logging and the same deployment as the rest of your work.

## Frequently asked questions

### Which protocols does Zato support?

SFTP, FTP, FTPS and SMB, through [outgoing SFTP connections](https://zato.io/docs/dev/file-transfer/sftp.html), [outgoing FTP connections](https://zato.io/docs/dev/file-transfer/ftp.html) and [outgoing SMB connections](https://zato.io/docs/dev/file-transfer/smb.html). All of them share one API, so a service written against one works against the others.

### How do I pick up files as they arrive?

Add a [file transfer schedule](https://zato.io/docs/dev/file-transfer/schedules.html) to the connection. It looks into a directory as often as you tell it to and invokes your service once per file.

### How does Zato know a file has finished uploading?

Either by watching it stop changing, or by waiting for a marker file the sender puts down when it is done. See [schedules](https://zato.io/docs/dev/file-transfer/schedules.html) for both modes.

### What does my service receive?

One [file transfer item](https://zato.io/docs/dev/file-transfer/receiving-files.html) per file, with the name, the full path, the size, the modification time and the contents.

### What happens to a file once it has been processed?

It is either moved to a destination directory of your choosing or deleted, as the schedule says. A file your service refuses is left exactly where it was and comes back on the next run.

### Can two servers watch the same directory?

Yes - turn claiming on and each file is renamed before anything reads it, so no two servers ever take the same one. See [real-world feeds](https://zato.io/docs/dev/file-transfer/feeds.html).

### Can I upload and download files from my own code?

Yes - the [connection API](https://zato.io/docs/dev/file-transfer/connection-api.html) gives your service the whole remote file system, with no schedule involved.

### How do I keep this configuration under version control?

With [enmasse](https://zato.io/docs/dev/file-transfer/enmasse.html). Connections and their schedules live in YAML and are imported into any environment.

## Ready to connect your file feeds?

Get started with Zato and build maintainable integrations around the files your partners send.

[Go to tutorials](https://zato.io/tutorials/index.html)
