p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: File Size

Message #1 by "Alex Alcaraz" <aalcaraz@e...> on Mon, 12 Mar 2001 13:06:15 +0100
Look into the FSO object see below its off the top of my head but it should
be something similar.

set FSO = CreateObject("Scripting.FileSystemObject")
set File = FSO.GetFile ("lala.txt")
Response.Write File.FileSize

Paul Broomfield Network Administrator and Database Technician
Tell Communications
Unit S15
Tamar Science Park
Tel:  +44 (0)1752 764242
Fax:  +44 (0)1752 764243
Visit us at http://www.tell-com.com/

-----Original Message-----
From: Alex Alcaraz [mailto:aalcaraz@e...]
Sent: 12 March 2001 12:06
To: How To
Subject: File Size

How can i know the size of a file which is in the server, with ASP Code?


Alex Alcaraz

-----Original Message-----
From: Gregory_Griffiths@c...
Sent: lunes, 12 de marzo de 2001 10:49
To: How To
Subject: RE: Download .txt files

Not just like that as the browser handles files according to how it is
onfigured on the client (i.e. MIME Types on client machine) which you
can't alter, but two of the most common workarounds are :

1. Change the extentsion to something odd or something that is always
downloaded (e.g. .zip)
2. Send a differing Content-Type back which IF unrecognised will prompt
for the dialog box.

> -----Original Message-----
> From: The_Fog@E... [mailto:The_Fog@E...]
> Sent: 12 March 2001 08:06
> To: proasp_howto@p...
> Subject: Download .txt files
> Hello
> I've got an application on wich you can upload files (i.e
> .txt files), and
> then everyone else is soupposed to be able to download it.
> All this sounds
> great, BUT if the file is a .txt file or a .jpg file then the
> file will be
> opened within the browser instead of downloaded.. And that
> ain't good.. ;)
> Is there a way to "force" the browser to download the file
> insted of  open
> it?
> Thanks
> Benny Olsson

  Return to Index