Send files into FTP server with Python.
This script for myself, and there are some bugs in this code.
Python2.7
git clone https://github.com/pyohei/python-ftp-sender.git
Install dependent libraries(recommend virtualenv).
cd python-ftp-sender
pip install -r requirements.txtYou need to edit config.ini.
You can run with two type of sync.
- Sync directory
If you want to sync directory, you must set variables of syncdir and header_path in config.ini.
After setting, you can run script the below command.
python main.py -a True- Sync specific file
If you want to sync specific file, you must set header_path in config.ini.
After setting, you can run script the below command.
You can change the argument of walker.py to your target file name.
python main.py -f walker.pyYou can run test ftp server with next command.
cd testserver
python ftpserver.pyThere are connection information in testserver/ftpserver.py
MIT