ranirajesh
asked on
How to find the size of the PDF Dynamically
Hi
I have an asp page with links to lots of pdfs from a different folder with the size of the pdf mentioned along with the link. I keep updating the pdfs in the folder. Is there a way to write a code , so that each time I update the pdf in the folder the size also changes accordingly in the asp page. Right now everytime I have to modify the asp page as well.
Please help ...
Thanks
Rani
I have an asp page with links to lots of pdfs from a different folder with the size of the pdf mentioned along with the link. I keep updating the pdfs in the folder. Is there a way to write a code , so that each time I update the pdf in the folder the size also changes accordingly in the asp page. Right now everytime I have to modify the asp page as well.
Please help ...
Thanks
Rani
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys this does work, but I have to display the pdf size in front of the individual links . The links are randomly placed in the asp file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot guys for you help on this one !
set fs=Server.CreateObject("Sc
set fo=fs.GetFolder("c:\")
for each x in fo.files
'Print the name and size of all files in the test folder
Response.write(x.Name & " (" & CLng(x.Size / 1024) & "kb) <br />")
next
set fo=nothing
set fs=nothing