Re: [Tutor] Add metadata to a dir of files.

2007-02-23 Thread Tim Golden
Mark Bystry wrote: > Ok, Tim. I believe you're right. If the vbscript is working then I'll > continue to use it and expand > on it. I'll only be using this on my WinXP box anyway. I just didn't want to > offend anyone in this > mailing list with vbscript code. I'm really trying to learn some py

Re: [Tutor] Add metadata to a dir of files.

2007-02-23 Thread Mark Bystry
Ok, Tim. I believe you're right. If the vbscript is working then I'll continue to use it and expand on it. I'll only be using this on my WinXP box anyway. I just didn't want to offend anyone in this mailing list with vbscript code. I'm really trying to learn some python basics but I'm no progr

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Kirk Bailey
Mark Bystry wrote: > Ok. I'm not sure what programming language I want to try this in...since I'm > not sure how to write > this in any language (thought I'd give python a try. > > Here's my problem: I have a directory full of about 2,000 pdf files. I want > to be able to add the > same comm

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Alan Gauld
"Mark Bystry" <[EMAIL PROTECTED]> wrote > Well that's awesome. Thanks for the code. Unfortunately > I cannot get it to run. After I installed the win32 extensions > for python... ISTR that before uing Windows scripting you have to enable it. There is a script in the library and a readme file tel

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Tim Golden
Tim Golden wrote: > Slightly bizarrely, it works fine for me on a different > computer (my laptop). Both are Win2K. The only help I > could find on the error code suggested a permission issue, > which isn't likely. That said, I have experienced a few > funnies with the Python script writing the new

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Tim Golden
Mark Bystry wrote: > Well that's awesome. Thanks for the code. Unfortunately I cannot get it to > run. After I installed > the win32 extensions for python...I get this error when trying to run. > > Traceback (most recent call last): >File "C:\test.py", line 4, in > props.SummaryPropert

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Mark Bystry
Well that's awesome. Thanks for the code. Unfortunately I cannot get it to run. After I installed the win32 extensions for python...I get this error when trying to run. Traceback (most recent call last): File "C:\test.py", line 4, in props.SummaryProperties.Category = "CAT69" File "C

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Tim Golden
Mark Bystry wrote: > getting even closer. figure out how to write to a file but still in vbscript. > > dsofile_write.vbs > code: > Set objFile = CreateObject("DSOFile.OleDocumentProperties") > objFile.Open("D:\test.txt") > objFile.SummaryProperties.Category = "CAT54" > objFile.Save In Python, tha

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Mark Bystry
getting even closer. figure out how to write to a file but still in vbscript. dsofile_write.vbs code: Set objFile = CreateObject("DSOFile.OleDocumentProperties") objFile.Open("D:\test.txt") objFile.SummaryProperties.Category = "CAT54" objFile.Save Mark Mark Bystry wrote the following on 2/22/200

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Mark Bystry
I think I'm getting close but with the wrong programming language... filename: test.vbs code: Set objFile = CreateObject("DSOFile.OleDocumentProperties") objFile.Open("C:\test.txt") Wscript.Echo "Category: " & objFile.SummaryProperties.Category With the help of dsofile.dll the above reads the "Ca

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Mark Bystry
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 a

Re: [Tutor] Add metadata to a dir of files.

2007-02-22 Thread Tim Golden
> 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.