Did anyone spot the glaring error in the last script? It misses the len(indata) which calculates the file size. I have corrected that now. Thanks to everyone who contacted me.