|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hello -
I need a little help with my VB/ASP page. I posted my first question in the VB forum, but I think posting it here is a bit more relevant. Basically, I'm creating a script that looks for a particular file in a specific directory, then launches it (if it exists). I need for the Server.MapPath to point to a DFS share, but I'm having trouble making this, or any path that leads to an alternate directory (outside of the ASP page's home directory) work correctly. Here's the code: Dim strPrinter Dim strPrinterName Dim FSOPrinter strPrinter = Request.QueryString("Printer") strPrinterName = Request.QueryString("PrinterName") Set FSOPrinter = Server.CreateObject("Scripting.FileSystemObject") If FSOPrinter.FileExists(Server.MapPath(strPrinter & ".pwc" )) Then Response.Redirect(strPrinter & ".pwc") Else Response.Write(strPrinter & " is an invalid printer name.") End If Can someone please help!? Thanks, DesertSky |
|
#2
|
|||
|
|||
|
OK, script modified as follows:
If FSOPrinter.FileExists(Server.MapPath("/testing/" & strPrinter & ".pwc")) Then Response.Redirect("/testing/" & strPrinter & ".pwc") Got it working, still no luck with the DFS share - I suspect my syntax is wrong...I'll continue researching. If anyone knows how to correct this problem in the meantime, please let me know. Thanks! ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > FSO Server.MapPath to a DFS share |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|