M
middletree
On an Intranet app, I want the user to be able to click the word Files, and
be taken to the folder that exists for that particular ticket. On a server
on our network, we have a folder called tickets, and inside, if anyone has
created a folder for a given ticket, it will have the naming convention of
T, then the ticket number. So Ticket #1000 will have a folder called T1000,
and it will be located on the folder called Tickets on that server.
However, if no folder has been created, then I want it to take them to the
root of the Tickets folder. Here's the code, with problem listed below that.
SET fso = CreateObject("Scripting.FileSystemObject")
strTraceDir = "\\servername\tickets\T"&strTicketID
If fso.FolderExists (strTraceDir) then
'don't change anything
Else
strTraceDir = "\\servername\tickets\"
End if
set fso= nothing
%>
<a href="<%=strTraceDir%>" target="_blank">Files:</a>
------------------------------------
For some reason, it is falling into the Else no matter what. Even though the
folder exists, it acts as if it doesn't. It jsut takes you to the root of
Tickets.
I did a response.write on several things, and confirmed that the strTicketID
variable is properly populated. What am I missing?
be taken to the folder that exists for that particular ticket. On a server
on our network, we have a folder called tickets, and inside, if anyone has
created a folder for a given ticket, it will have the naming convention of
T, then the ticket number. So Ticket #1000 will have a folder called T1000,
and it will be located on the folder called Tickets on that server.
However, if no folder has been created, then I want it to take them to the
root of the Tickets folder. Here's the code, with problem listed below that.
SET fso = CreateObject("Scripting.FileSystemObject")
strTraceDir = "\\servername\tickets\T"&strTicketID
If fso.FolderExists (strTraceDir) then
'don't change anything
Else
strTraceDir = "\\servername\tickets\"
End if
set fso= nothing
%>
<a href="<%=strTraceDir%>" target="_blank">Files:</a>
------------------------------------
For some reason, it is falling into the Else no matter what. Even though the
folder exists, it acts as if it doesn't. It jsut takes you to the root of
Tickets.
I did a response.write on several things, and confirmed that the strTicketID
variable is properly populated. What am I missing?