var filePath= document.all.upfile.value; var fso, f, s; fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFile(filePath); alert(f.Size)