Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Path not found

    Hello All!
    I found function for enumerate files in special folder and pasted in my asp
    page, but Server generate error.
    Who could tell me why server IIS 5.0 generate error, and how I must input
    path for [url]http://host/pdf?[/url]
    <%
    function ShowFolderFileList(folderspec)
    {
    var fso, f, f1, fc, s;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    f = fso.GetFolder(folderspec);
    fc = new Enumerator(f.files);
    s = ""; for (; !fc.atEnd(); fc.moveNext())
    {
    s += fc.item();
    s += "";
    }
    return(s);
    }
    var str;
    str = ShowFolderFileList('http://localhost/pdf'); or str =
    ShowFolderFileList('/pdf');
    ^^^^^^^^^^^^^^^ error at this string Path not found

    Response.Write(str);
    %>
    Thanks.
    Stas.


    Stas Guest

  2. Similar Questions and Discussions

    1. clipping path shows ouside path in quark
      I'm making paths on silo'd objects on white backgrounds to place on colored backgrounds in quark 4. Operating pshop 6.01 in os 9.2. I put the path on...
    2. Why is nothing found in @INC path ?!?!
      Hi, I'm trying to build a CGI PerL web app hosted on Fedora/Apache machine, making XML requests to a Windows/IIS machine (No, I have no choice in...
    3. Convert text path back to regular path
      Im sure this has been covereed beofre , but I want to take an oddly shaped pathy that I have converted to a text path, and revert it to a regualr...
    4. #25444 [Opn->Bgs]: php4isapi.dll path to win.ini doesn't load from current path.
      ID: 25444 Updated by: sniper@php.net Reported By: ict at primus dot ca -Status: Open +Status: Bogus...
    5. OSX: translate path with slashes to path with colons and volume name
      Hi all, I need to convert a UNIX-path to a Mac OS X path. For example: /Applications/Chess.app matches Macintosh HD:Applications:Chess.app ...
  3. #2

    Default Re: Path not found

    FileSystemObject works on LOCAL paths. So, maybe you meant
    Server.MapPath("/pdf/")

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "Stas" <stsn2000@mail.ru> wrote in message
    news:OUBLgx04DHA.2528@TK2MSFTNGP09.phx.gbl...
    > Hello All!
    > I found function for enumerate files in special folder and pasted in my
    asp
    > page, but Server generate error.
    > Who could tell me why server IIS 5.0 generate error, and how I must input
    > path for [url]http://host/pdf?[/url]
    > <%
    > function ShowFolderFileList(folderspec)
    > {
    > var fso, f, f1, fc, s;
    > fso = new ActiveXObject("Scripting.FileSystemObject");
    > f = fso.GetFolder(folderspec);
    > fc = new Enumerator(f.files);
    > s = ""; for (; !fc.atEnd(); fc.moveNext())
    > {
    > s += fc.item();
    > s += "";
    > }
    > return(s);
    > }
    > var str;
    > str = ShowFolderFileList('http://localhost/pdf'); or str =
    > ShowFolderFileList('/pdf');
    > ^^^^^^^^^^^^^^^ error at this string Path not found
    >
    > Response.Write(str);
    > %>
    > Thanks.
    > Stas.
    >
    >

    Aaron Bertrand [MVP] Guest

  4. #3

    Default Re: Path not found



    Stas wrote:

    > I found function for enumerate files in special folder and pasted in my asp
    > page, but Server generate error.
    > Who could tell me why server IIS 5.0 generate error, and how I must input
    > path for [url]http://host/pdf?[/url]
    > <%
    > function ShowFolderFileList(folderspec)
    > {
    > var fso, f, f1, fc, s;
    > fso = new ActiveXObject("Scripting.FileSystemObject");
    > f = fso.GetFolder(folderspec);
    > fc = new Enumerator(f.files);
    > s = ""; for (; !fc.atEnd(); fc.moveNext())
    > {
    > s += fc.item();
    > s += "";
    > }
    > return(s);
    > }
    > var str;
    > str = ShowFolderFileList('http://localhost/pdf'); or str =
    > ShowFolderFileList('/pdf');
    > ^^^^^^^^^^^^^^^ error at this string Path not found
    Try
    ShowFolderFileList(Server.MapPath('/pdf')
    --

    Martin Honnen
    [url]http://JavaScript.FAQTs.com/[/url]

    Martin Honnen Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139