Thanks... This script is very helpful for me.. The script is throwing error if the file size is more than 500MB .. Can you please help me on how to handle big files for more than 500 Mb.. i am getting out of memory exception error