Smrutilekha Swain wrote:
hi...this is my code...but...it is not working...in this programme i want
the pdf will be copied from source to destination after it is generated....

##############################################

import os
import shutil

src = os.getcwd()
dest = "E:\home\smruti\Python\PostMissionAnalysis\presentation"

#################################################################

def file_moved(filename):
    #filename = 'newfile.pdf'
    file_list = os.listdir(os.curdir)
    for eachfile in file_list:
        if (eachfile == filename):
            shutil.copy(src,dest)
I guess, 'src' needs a filename, right now, its your os.getcwd(). you should probably set it to os.getcwd() + 'filename'.

HTH,
Amit


--
Journal: http://amitksaha.wordpress.com
ยต-blog: http://twitter.com/amitsaha
IRC: cornucopic on #scheme, #lisp, #math, #linux
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to