Prototype a file iterator (partly culled from pywin32 implementation)