Thanks a lot, but i think i got the solution... like u guys mentioned its the size of the disk thats smaller and couldnt accomodate the file. i tried running the script on a smaller file and it works like a charm.. thanks a lot for the quick response...