Execute SFTP commands from a batch file.
Section: sftp Basics
Run SFTP in batch mode
bash
bash
sftp -b batch.txt user@example.comExplanation
Execute SFTP commands from a batch file.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing sftp Basics
Connect to SFTP on a custom port
Specify a non-default SSH port for SFTP.
Resume an interrupted download
Continue downloading a partially transferred file.
Resume an interrupted upload
Continue uploading a partially transferred file.
Download within interactive sftp
Get a file during an interactive session.