"Que Prime" <[EMAIL PROTECTED]> wrote > I'm trying to copy files from one directory to another based on an > input txt > file containing the filename. > > Source directory = C:\test > Destination directory = C:\output > > input.txt looks like: > > 12345.pdf > 12344.pdf
Try writing what you want to do in structured English first Open the file input.txt For each line in input.txt : copy the named file from source to destination Close the file input.txt Now can you write that ion Python? (You may want to check the shutil module for copying the files) If you can';t get it to work send us your code and any error messages you get. You will find more detailed info in the Using the OS topic of my tutor. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor