Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use UNC paths for FileSystemObjects?

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
US
I can't figure out what I am doing wrong in my script. Here is my code:
Dim layoutP
layoutP = "\\Dell2400\KPDP2\Layouts\Senior Pkgs\"
Dim layoutF
layoutF = layoutP & formArray(6) & ".txt"
Const ForReading = 1, ForWriting = 2
Dim oFSO, fLayout, fJob
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set fLayout = oFSO.OpenTextFile("Z:\Layouts\Test\810-10-MP-2.txt", ForReading)'Z:\\Layouts\\Senior Pkgs\\YBK-C-DLS.txt
'Set fJob = oFSO.CreateTextFile(jobPath)
Response.Write layoutF

I get the message 'Microsoft VBScript runtime (0x800A004C)
Path not found' when I set fLayout. The path is correct. What is wrong? What am I missing?
 
No, you can't use UNC paths for the fileSystemObject. It expects a fully qualified disk path to do its work.

:-(
paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top