Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a file type input and an asp upload component to save the file from the client to the server. If the user types the file name or path that doesn't exist, the upload component still creates a file on the destination but the file is empty. How can I determine the size of the file saved on the destination?
Posted
Updated 31-Mar-10 21:58pm
v2

1 solution

Hi there,
I want to help. Look here:

function FSOGetFile()
{
fso = new ActiveXObject("Scripting.FileSystemObject");
a = fso.GetFile('name.txt');
b = a.Size;
c = a.Type;
alert('name.txt is '+b/1024+
' KB and have the Typ "'+c+'".');
return
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900