The code does NOT working, also i didn't knew that the $file working for folders, thanks, but the problem is that $file($mircdir).size (for example) does NOT work, so the suggestion is to make the $file(dir).size to work for folders size.