Evil Functions - NSE
A bhavcopy has the following details (along with TOTTRDQTY,TOTTRDVAL,TIMESTAMP,ISIN) of all stocks under NSE for the given date.
Typically you will have to visit this link and download the bhavcopy.
This script will let you automate this and download bhavcopy of any date. You can event give date ranges and get all the copies at once.