Path not found - Help Please Beginner

Results 1 to 2 of 2

Thread: Path not found - Help Please Beginner

  1. #1
    Join Date
    Dec 1969

    Default Path not found - Help Please Beginner

    I am getting a path not found error when I am running my test web. I have it set up so that I pass variables through the query string and in my last ASP page supposedly these values are to be put in a specific directory. The Specifics are that I have created a test folder on my desktop as my virtual directory, and the NFL/INTERNET is off the root of C:/. All the pages work till i hit this one - path not found. Anyone have any ideas????<BR><BR><BR>Here is my code:<BR><BR>filetest1 = 1<BR>filetest2 = 1<BR><BR>while filetest1 =1<BR> randomize()<BR> random1 = Int((10000000 * Rnd) + 10000000)<BR> Set loginfile = Server.CreateObject("Scripting.FileSystemObject")< BR> logfile1 = "........
    flinternet\" & random1 & ".100"<BR> logfile2 = Server.MapPath(logfile1)<BR> If loginfile.FileExists(logfile2) Then<BR> filetest1=1<BR> Else<BR> filetest1=2<BR> End If<BR>Wend<BR><BR>wrfile = "........
    flinternet\" & random1 & ".100"<BR><BR>output1 = "sjnb4.asp?R=" & random1 & "&F=" & ferry1<BR><BR>Set info1 = Server.CreateObject("Scripting.FileSystemObject")< BR>infow = Server.MapPath(wrfile)<BR><BR>Set OutStream = info1.CreateTextFile(infow)<BR>OutStream.WriteLine ferry1<BR>OutStream.WriteLine date1

  2. #2
    Join Date
    Dec 1969

    Default A tiny bit of debugging?

    wrfile = "........
    flinternet\" & random1 & ".100"<BR>...<BR>infow = Server.MapPath(wrfile)<BR><BR>&#039 ADD THIS LINE:<BR>Response.Write "infow is " & infow & "&#060;P&#062;"<BR><BR>**************<BR><BR>D oes that print the physical file name you expected?<BR><BR>The problem with relative path names is that they indeed *are* relative. If you move to another directory, then they move, too.<BR><BR>If you want to put the file in your C: root, then why not just name it<BR><BR>wrfile = "c:\" & random1 & ".100"<BR><BR>and don&#039t bother with MapPath?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts