You are not logged in.
Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
:-*


|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import ftplib
import os.path
import time
FILENAME = 'test.zip'
FTP_HOST = 'example.com'
FTP_USER = 'username'
FTP_PASSWD = 'password'
def upload_file():
"""Datei hochladen."""
conn = ftplib.FTP(FTP_HOST, FTP_USER, FTP_PASSWD)
conn.storbinary('STOR %s' % FILENAME, FILENAME)
conn.quit()
if __name__ == '__main__':
while True:
if os.path.exists(FILENAME):
______upload_file()
time.sleep(10)
|
Quoted from "Y0Gi"
Pah, das kann man ja auch wohl mal eben selbst programmieren!![]()

|
|
Source code |
1 |
conn.storebinary('STOR %s' % FILENAME, FILENAME)
|



|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import ftplib
import os.path
import time
FILENAME = 'test.zip'
FTP_HOST = '***.de'
FTP_USER = '***'
FTP_PASSWD = '****'
def upload_file():
"""Datei hochladen."""
conn = ftplib.FTP(FTP_HOST, FTP_USER, FTP_PASSWD)
conn.cwd('public_html\ftp')
conn.storebinary('STOR %s' % FILENAME, FILENAME)
conn.quit()
if __name__ == '__main__':
while True:
if os.path.exists(FILENAME):
upload_file()
time.sleep(10)
|

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import ftplib
import os.path
import time
FILENAME = 'test.zip'
FTP_HOST = '***.de'
FTP_USER = '****'
FTP_PASSWD = '****'
def upload_file():
"""Datei hochladen."""
conn = ftplib.FTP(FTP_HOST, FTP_USER, FTP_PASSWD)
conn.cwd('//public_html/ftp/')
conn.storbinary('STOR %s' % FILENAME, FILENAME)
conn.quit()
if __name__ == '__main__':
while True:
if os.path.exists(FILENAME):
upload_file()
time.sleep(10)
|

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import ftplib
import os.path
import os
import time
FILENAME = 'test.zip'
FTP_HOST = 'ftp-server.de'
FTP_USER = '*****'
FTP_PASSWD = '*****'
def upload_file():
"""Datei hochladen."""
conn = ftplib.FTP(FTP_HOST, FTP_USER, FTP_PASSWD)
conn.cwd('/public_html/ftp/')
conn.storbinary('STOR '+ FILENAME, open(FILENAME, "rb"), 1024)
# wenn man will, dass die Datei nach dem hochladen auch geloescht wird
# in der naechsten Zeile die fuehrende Raute entfernen
#os.remove(FILENAME)
conn.quit()
if __name__ == '__main__':
while True:
if os.path.exists(FILENAME):
upload_file()
time.sleep(10)
|
Quoted from "hobbes_dmS"
jaja, Y0Gi, mit dem blind coden ist es immer so 'ne Sache![]()
-