Hey guys, I'm making a CMS for my website with python.
I was wondering if anybody could give me some insight on (perhaps) an OS function that will copy a file from one folder and 'paste' it in another. thanks!:cheesy:
Alright...I couldn't find anything as far as the os module I tried this but I still couldn't get it to work:
import shutil
shutil.copy("hipgamer/list.htm", "ftp://hipgamer@64.139.104.222")
Traceback (most recent call last):
File "hipgamer/transfer.py", line 3, in <module>
shutil.copy("hipgamer/list.htm", "ftp://64.139.104.222")
File "C:\Python25\lib\shutil.py", line 80, in copy
copyfile(src, dst)
File "C:\Python25\lib\shutil.py", line 47, in copyfile
fdst = open(dst, 'wb')
IOError: [Errno 2] No such file or directory: 'ftp://64.139.104.222'
So it worked fine with a normal folder, but I couldn't get it to upload to the FTP (understandable)
any input would be great, thanks!