Alan Gauld wrote:
There was a time in the good old days that programmers knew about writing specifications. Nowadays specification by example seems to be the defacto standard. Sigh."Que Prime" <[EMAIL PROTECTED]> wroteI have a folder of 150,000 pdf files and I need to copy 20,000 of them to another folder. The ones I need to copy are in a .txt file.Sounds straightforward but...Attached is a sample of the input .txt file and a dos directory of the folder containing the files. I'm not sure of the best way to accomplish this. Thank you in advance for your help. Sample input file: 12347424 12347425 Sample dir on folder: 03/20/2008 09:21 AM 145,257 000000011479 [7ac0c741-9d2f-4a1d-9dbf-8de27ca0abb4].pdfI don;t see how the input file relates to the pdf files? Which part of the pdf file does the input numbers refer to? I can guess that given 03/20/2008 09:21 AM 152,785 000012347424 [44cc0d43-a80d-4415-8e92-b6a4f62986b4].pdf 000012347424 [44cc0d43-a80d-4415-8e92-b6a4f62986b4].pdf is the file name. I happen to notice that 12347424 appears in the input file and in the assumed file name. So the specification *might be* choose files where characters 5-12 of the name match the eight characters of a line of the input file. Wouldn't it be nice if the asker of the question were to say "yes that is correct" or "no and here is the correct specification". It would have been even nicer if he/she had given the specification the first time. Would have saved everyone time and helped ensure a quick and correct answer. -- Bob Gailer 919-636-4239 Chapel Hill, NC |
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor