in reply to Shorten script

Since $name is not changed within the while loop, why keep pushing it into @files?