I have a question of which i have no idea if it can be accomplished.
The following script shows me all files that are in the folder "/here/okido/", as link on an .asp page.
Quote:
<%
dim IISFOLDER
IISFOLDER = Server.MapPath("/Here/okido/")
Dim fso, folder, File, Files, sFileDetails
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(IISFOLDER)
Set Files = folder.Files
For Each File in Files
%>
<b>
<a href = '/Partitions/Joucomatic/<%= File.Name %>' target = '_blank'> <%= File.Name %>
</a>
</b>
<br />
<%
Next
Set folder = Nothing
Set fso = Nothing
%>
Unquote
I have 2 problems:
1.: Each time i wish to use this page in another folder, i have to manually change the folders location ("here/okido/") in the script.
Is there a way to have it automatically show the files of the folder that it is in, without having to change the script all the time?
2.: if i put the asp page in the folder i wish to view the files from, it shows itself in between the files. Can this script be adjusted so it doesn't display the asp page itself?
Thanks in advance for your help
The following script shows me all files that are in the folder "/here/okido/", as link on an .asp page.
Quote:
<%
dim IISFOLDER
IISFOLDER = Server.MapPath("/Here/okido/")
Dim fso, folder, File, Files, sFileDetails
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(IISFOLDER)
Set Files = folder.Files
For Each File in Files
%>
<b>
<a href = '/Partitions/Joucomatic/<%= File.Name %>' target = '_blank'> <%= File.Name %>
</a>
</b>
<br />
<%
Next
Set folder = Nothing
Set fso = Nothing
%>
Unquote
I have 2 problems:
1.: Each time i wish to use this page in another folder, i have to manually change the folders location ("here/okido/") in the script.
Is there a way to have it automatically show the files of the folder that it is in, without having to change the script all the time?
2.: if i put the asp page in the folder i wish to view the files from, it shows itself in between the files. Can this script be adjusted so it doesn't display the asp page itself?
Thanks in advance for your help