Hi,
I have got a text file which contains lots of information about PDF files that are stored in a directory on our server.
The format of the file is like this
Filename:
ABC123.PDF
InfoKey: Author
InfoValue: JOAN
InfoKey: Series
InfoValue: 1A07
InfoKey: Spec
InfoValue: 8650
InfoKey: Producer
InfoValue: Acrobat Distiller 6.0.1 (Windows)
InfoKey: ModDate
InfoValue: D:20070307085652Z
InfoKey: Keywords
InfoValue: This is a Sample file, testing keywords.
InfoKey: Comp
InfoValue: TT05
I need to read the file and extract the filename and the keywords from the file and put them into another file seperate the values with a comma, this other file will then be used to populate a database. How can I achieve this?
Thanks
Stephen