FileSystemObject Scripting don't work

Discussion in 'ASP General' started by Bob Barrows [MVP], Dec 1, 2005.

  1. Edward Low wrote:
    > Hi All,
    > Get it work once i disable the script blockin in my Antivirus
    > setting....

    Thanks for letting us know, but if someone had already wasted his time
    replying to this question here without realizing you had already received an
    answer in .asp.db (what does this question have to do with db's anyways? why
    post it there at all?), he would not have been a happy camper. What are the
    chances that he would respond to any further questions from you?

    Please don't multipost. The best practice is to pick a single newgroup that
    you feel is most relevant to your question and post it there. If you've
    guessed wrong, someone will let you know (usually politely). If you feel you
    must get input from members of more than one group, crosspost instead of
    multiposting by putting the names of each group into the To field of a
    single newsgroup post. That way responses will be seen by all regardless of
    which newsgroup the responses originated in. Again, it is best to keep the
    number of groups in the crosspost small.

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Dec 1, 2005
    #1
    1. Advertising

  2. Edward Low wrote:
    > Hi All,
    > Get it work once i disable the script blockin in my Antivirus
    > setting....


    Oh, and please fix your clock.
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Dec 1, 2005
    #2
    1. Advertising

  3. Bob Barrows [MVP]

    Edward Low Guest

    Hi,

    I am having ASP with the following code to access the file with windows
    scripting host. The page run on local server IIS 5.1 on Win XP Pro SP2. The
    IE never show me any error with this, but will keep access the page for very
    long. This code is running fine on other system.

    strFilePath = Server.MapPath("\db\counter.txt")
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    objFSO.OpenTextFile(strFilePath, ForReading)
    iCounterNumber = Cdbl(objCounterFile.ReadLine) + 1
    objCounterFile.Close

    This code will work fine if i change 3rd line to
    [objFSO.OpenTextFile(strFilePath,1) ].

    Questions:
    1. Why objFSO.OpenTextFile(strFilePath, ForReading) can't work on my system
    but can run on the others system.
    2. Why IE never show me error message but keep accessing the page for very
    long with the above code?

    thanks & regards,

    Edward
    Edward Low, Dec 1, 2005
    #3
  4. Bob Barrows [MVP]

    Edward Low Guest

    Hi All,
    Get it work once i disable the script blockin in my Antivirus setting....

    Thanks
    Edward

    "Edward Low" <> wrote in message
    news:%23a$...
    > Hi,
    >
    > I am having ASP with the following code to access the file with windows
    > scripting host. The page run on local server IIS 5.1 on Win XP Pro SP2.
    > The IE never show me any error with this, but will keep access the page
    > for very long. This code is running fine on other system.
    >
    > strFilePath = Server.MapPath("\db\counter.txt")
    > Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    > objFSO.OpenTextFile(strFilePath, ForReading)
    > iCounterNumber = Cdbl(objCounterFile.ReadLine) + 1
    > objCounterFile.Close
    >
    > This code will work fine if i change 3rd line to
    > [objFSO.OpenTextFile(strFilePath,1) ].
    >
    > Questions:
    > 1. Why objFSO.OpenTextFile(strFilePath, ForReading) can't work on my
    > system but can run on the others system.
    > 2. Why IE never show me error message but keep accessing the page for very
    > long with the above code?
    >
    > thanks & regards,
    >
    > Edward
    >
    Edward Low, Dec 1, 2005
    #4
  5. Boy, you sure are a picky fellow
    Cut these people some slack.


    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > Edward Low wrote:
    >> Hi All,
    >> Get it work once i disable the script blockin in my Antivirus
    >> setting....

    >
    > Oh, and please fix your clock.
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    Larry Randolf, Dec 3, 2005
    #5
  6. I'm sorry you think it's picky. The view I normally use sorts the messages
    by posting date. I almost replied to the wrong message because the OP's
    clock was set incorrectly. I thought he might appreciate knowing that his
    clock was wrong. My only fault (IMO) was saying it too curtly which I now
    regret.

    Larry Randolf wrote:
    > Boy, you sure are a picky fellow
    > Cut these people some slack.
    >
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:...
    >> Edward Low wrote:
    >>> Hi All,
    >>> Get it work once i disable the script blockin in my Antivirus
    >>> setting....

    >>
    >> Oh, and please fix your clock.
    >> --
    >> Microsoft MVP - ASP/ASP.NET
    >> Please reply to the newsgroup. This email account is my spam trap so
    >> I don't check it very often. If you must reply off-line, then remove
    >> the "NO SPAM"


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Dec 3, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,703
  2. Mark
    Replies:
    0
    Views:
    112
  3. Giorgio Cervati

    Scripting.FileSystemObject

    Giorgio Cervati, Sep 3, 2003, in forum: ASP General
    Replies:
    0
    Views:
    147
    Giorgio Cervati
    Sep 3, 2003
  4. PB4FUN

    Scripting.FileSystemObject problems

    PB4FUN, Sep 20, 2003, in forum: ASP General
    Replies:
    3
    Views:
    155
    PB4FUN
    Sep 20, 2003
  5. bart plessers

    NTFS-security and Scripting.FileSystemObject

    bart plessers, Oct 22, 2003, in forum: ASP General
    Replies:
    0
    Views:
    116
    bart plessers
    Oct 22, 2003
Loading...

Share This Page