So it should be $FileName = Dir("", 1) and $Folder = Dir()? This still seems to be giving me the same problem...?