Hi Rahul,
You will need to do this with code, it can't be done via the InfoPath designer without code. Qdabra has developed a great tool called "qRules" that has over 40 commands that normally require code. Several of the commands in qRules have to do with writing to different SharePoint lists and or libraries including uploading file attachments from InfoPath to the list item in SharePoint. qRules is a powerful tool and should help you accelerate your InfoPath development compared to writing your own code to do this.
You can find out more about qRules here: http://www.qdabra.com/en/products/qRules.aspx including a free trial version to try out before you purchase.
Hope that helps
Ted