Exporting Documents to Flat file and attachments of that documents should be copy to specified folder

Hi,This is Ravindra.

Requirement:

->Need to export the documents in a row wise with field labels as column names to a flat file.

->If the document has any attachments, it should copy and paste them in a folder named with that document number.

Please help me .

Please send the code if any one worked on this functionality.

my mail ID: rmogallapu@yahoo.com

Thanks and Regards,

Ravindra