www.webdeveloper.com
Results 1 to 3 of 3

Thread: Bad file name or number

  1. #1
    Join Date
    Jan 2011
    Posts
    59

    Bad file name or number

    Hi,

    I recently noticed that some of my code that used to work now displays an error: Bad file name or number

    <%Session("file") = request.Querystring("Filedata")
    xmlfile = (session("file"))%>

    <% response.write(request.querystring("PONumber")) %>

    <% set fso = Server.CreateObject("Scripting.FileSystemObject")

    Set LogFile = fso.OpenTextFile("c:\Inetpub2\"+xmlfile+".xml",2,true) %>


    The file it should display is: 363040091199871198680889_1

    but now it decides to show the whole file path as well causing the issue:
    R:\RS Purchase Orders ap\363040091199871198680889_1

    How can I get the code to just grab that file name once again?

    Thanks for your support

    Adam

  2. #2
    Join Date
    Oct 2005
    Posts
    9
    In ASP Ampersand sign is used for concatenation i.e:

    Set LogFile = fso.OpenTextFile("c:\Inetpub2\"&xmlfile&".xml", 2)

  3. #3
    Join Date
    Jan 2011
    Posts
    59
    Worked like a treat thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles