473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

URGENT open file

102 100+
Expand|Select|Wrap|Line Numbers
  1. <%
  2.  
  3. Dim objFolder   
  4.  
  5.  Set fso=Server.CreateObject("Scripting.FileSystemObject")
  6. Set objFolder = fso.GetFolder("C:\Inetpub\wwwroot\CLS1\FA\Uploads")
  7.  
  8. For Each objFile in objFolder.Files 
  9.      Response.Write("<u>" &objFile.Name &"<u><br>")    
  10. Next
  11.  
  12. For Each objFile in objFolder.subfolders
  13.      Response.Write("<u>" &objFile.Name &"<u><br>")    
  14. Next
  15.  
  16. %>
how do i open the file above?? i wan to click on the file ..<u> &objFile.Name &"<u>.. then will prompt me whether wan to save or open..
Jul 6 '07 #1
3 1219
jhardman
3,406 Expert 2GB
Unfortunately, you write the link the same way you would write any hyperlink in HTML, and then prompting you to open or save is a browser-dependent behavior. Try writing:
Expand|Select|Wrap|Line Numbers
  1. response.Write("<a href=" & chr(34) & objFile.Name & chr(34) &">" & objFile.Name & "</a>")
and if the browser interprets it correctly, then you know you did it right.

Jared
Jul 6 '07 #2
lyealain
102 100+
<%

Dim objFolder

Set fso=Server.CreateObject("Scripting.FileSystemObjec t")
Set objFolder = fso.GetFolder("C:\Inetpub\wwwroot\CLS1\FA\Uploads" )

For Each objFile in objFolder.Files
response.Write("<a href=" & chr(34) & objFile.Name & chr(34) &">" & objFile.Name & "</a>")

Next

%>
i put like this??
Jul 7 '07 #3
jhardman
3,406 Expert 2GB
that looks right to me
Jul 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: SB | last post by:
What I want to achieve ... Display file names from sql server database, on click the file should open up using test.exe file. Using the following code, I am able to display the files and click on...
8
by: gremlinbass | last post by:
I was wondering if I can check to see if a file is open? Specifically, is there any way I can code Access to check to see if a text file (datasource.txt to be specific) is open, returning a true...
2
by: Rob Manger | last post by:
Hi Guys, Urgent problem. Trying to compile my solution I get the following error: Linking... LINK: fatal error LNK1181: cannot open input file 'Release\icmpping.abj' Note, I havn't changed...
4
by: Nick | last post by:
Hi I am a little stuck. I have a web app which uses cookieless session management. I would like to inform a user when their session has ended but cannot work out how to implement. I thought...
6
by: DraguVaso | last post by:
Hi, I have files I need to read, which contains records with a variable lenght. What I need to do is Copy a Part of such a File to a new File, based on the a Begin- and End-record. I used...
13
by: Niyazi | last post by:
Hi I have a report that I have to run it monthly in my machine. My code in VB.NET and I access AS400 to get data, anaysie it and send into pre formated Excel sheet. The data consist of 9000...
1
by: situ | last post by:
hi all, this is the procedure i have created CREATE PROCEDURE XIREL2.proc_size_2 (p_dummy CHAR(1)) SPECIFIC XIREL2.proc_size_2 DYNAMIC RESULT SETS 3...
2
by: kumar_ps | last post by:
Hi, I am new for VB6.0 i need help urgent.. I have taken a picture box and a dialogbox for open when i click open dialog is showing bu how to open pdf files in the picturebox. and suppose we open a...
1
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
0
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.