[Tutor] Add metadata to a dir of files.

Mark Bystry mabystry at verizon.net
Thu Feb 22 19:01:40 CET 2007


Actually no. I want to change the Windows metadata. This is the same metadata that is on all files. 
It isn't PDF specific. (I wonder if Linux is the same)

Basically, I can select 100's of file in a dir, right-click, properties, summary, and add something 
to the Category field. This obviously affects all files giving them all the same attribute. I can 
continue doing it this way but I thought perhaps a script would be best. Maybe it isn't, I don't know.

Anyway, thank-you for the links.

Mark

Tim Golden wrote the following on 2/22/2007 12:28 PM:
>> Here's my problem: I have a directory full of about 2,000 pdf files. I want to be able to add the 
>> same comment to the "Category" field of each file (in the document properties of the file). So I am 
>> looking to batch process pdf files (or any filetype, i guess) to add some metadata.
> 
> I'm assuming here that we're talking about the PDF's
> own metadata rather than, say, the additional stuff
> which Windows allows in Alternate Data Streams? If
> so, then a combination of PyPDF:
> 
>    http://pybrary.net/pyPdf/
> 
> and the builtin os, glob, os.path modules:
> 
>    http://docs.python.org/lib/module-os.html
>    http://docs.python.org/lib/module-os.path.html
>    http://docs.python.org/lib/module-glob.html
> 
> might suit the case.
> 
> TJG
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 


More information about the Tutor mailing list