Searching file in ASP

Discussion in 'ASP General' started by Jason, Sep 11, 2009.

  1. Jason

    Jason Guest

    Dear all,

    How can I search the file name in specified folder(like "DIR" method in dos)?

    for example : searching "c:\abc\test*.jpg"
    result = c:\abc\test12345.jpg

    Thank you.
    Jason
    Jason, Sep 11, 2009
    #1
    1. Advertising

  2. Jason

    Bob Barrows Guest

    Jason wrote:
    > Dear all,
    >
    > How can I search the file name in specified folder(like "DIR" method
    > in dos)?
    >
    > for example : searching "c:\abc\test*.jpg"
    > result = c:\abc\test12345.jpg
    >

    http://www.aspfaq.com/show.asp?id=2039
    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    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, Sep 11, 2009
    #2
    1. Advertising

  3. Hello,

    The previous post provides the good choice: FileSystemObject
    You can't search the file with "test*.jpg" directly, but you can traverse
    the directory and get all files, and then you can filter out the matched
    file according to the file name you gave.
    http://www.freevbcode.com/ShowCode.Asp?ID=1487


    Sincerely,

    Vince Xu

    Microsoft Online Support


    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    MSDN Managed Newsgroup support offering is for non-urgent issues where an
    initial response from the community or a Microsoft Support Engineer within
    2 business day is acceptable. Please note that each follow up response may
    take approximately 2 business days as the support professional working with
    you may need further investigation to reach the most efficient resolution.
    The offering is not appropriate for situations that require urgent,
    real-time or phone-based interactions. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    ==================================================
    Vince Xu [MSFT], Sep 14, 2009
    #3
  4. Gazing into my crystal ball I observed
    (Vince Xu [MSFT]) writing in
    news::

    > Vince Xu
    >
    > Microsoft Online Support
    >
    >
    >==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/en-

    us/subscriptions/aa948868.aspx#notificatio
    > ns.
    >
    > MSDN Managed Newsgroup support offering is for non-urgent issues where
    > an initial response from the community or a Microsoft Support Engineer
    > within 2 business day is acceptable. Please note that each follow up
    > response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach
    > the most efficient resolution. The offering is not appropriate for
    > situations that require urgent, real-time or phone-based interactions.
    > Issues of this nature are best handled working with a dedicated
    > Microsoft Support Engineer by contacting Microsoft Customer Support
    > Services (CSS) at
    > http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    >==================================================
    >
    >


    Vince, do you think you could use a proper signature? Two dashes, a
    space and a carriage return, and preferably up to 4 lines of signature.
    The verbiage you are using in your current signature is not necessary
    for usenet postings.

    Conforming news clients will strip a properly configured signature.
    Understand that some folks are still on dial up, and downloading a lot
    of extra signature is costly and counter productive.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Sep 14, 2009
    #4
  5. Hello Adrienne,

    Thanks for your suggestion. But for our process, I need to use such
    signature in my first reply. Because we need to let the customer know some
    points about newsgroup.
    However, we will use the abbreviated signature after the first post.

    Regards,

    Vince Xu

    Microsoft Online Support
    Vince Xu [MSFT], Sep 15, 2009
    #5
  6. Gazing into my crystal ball I observed
    (Vince Xu [MSFT]) writing in
    news:p:

    > Hello Adrienne,
    >
    > Thanks for your suggestion.


    What suggestion? Please quote relavent text in your replies. Remember,
    not all news servers have the same retention. Someone could be reading
    this and not have access to the original message.

    > But for our process, I need to use such
    > signature in my first reply. Because we need to let the customer know
    > some points about newsgroup.


    No, you don't. This is usenet, and these are not necessarily microsoft
    customers.

    Usenet is a discussion system, not a 24/7 help desk. If someone posting
    here happens to find an answer to a question within the discussion, then
    that's a good thing, but it's not a guarantee.

    True, it's a microsoft.public group, but it's still usenet, and there
    are still conventions to follow.

    > However, we will use the abbreviated signature after the first post.
    >
    > Regards,
    >
    > Vince Xu
    >
    > Microsoft Online Support
    >
    >


    And you still have not fixed your signature. A signature should be two
    dashes and a space followed by a carriage return. You see, had you used
    a proper signature, my news client would automatically have stripped
    your signature.

    If you use a conforming news client, upon replying to this post, my
    signature will magically disappear!

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Sep 15, 2009
    #6
  7. Hello,

    I am an MSFT. Every MSFT in public group will apply this such format of
    signature. We have our own standard template for the signature. I'm just
    one of them. I haven't any right to modify this template signature.
    If you need me append two dashes and a space before the signature, I will.
    That'll be a little helps. But sorry for I can't modify any of signure
    body.


    --
    Regards,
    Vince Xu
    Microsoft Online Support

    --------------------
    | From: Adrienne Boswell <>
    | Newsgroups: microsoft.public.inetserver.asp.general
    | Subject: RE: Searching file in ASP
    | Date: Tue, 15 Sep 2009 03:51:00 +0000 (UTC)
    | Organization: arbpen.com
    | Lines: 50
    | Message-ID: <Xns9C86D41846F1arbpenyahoocom@188.40.43.213>
    | References: <>
    <>
    <Xns9C863C5CA30arbpenyahoocom@188.40.43.213>
    <>
    | X-Trace: news.eternal-september.org
    U2FsdGVkX1/7vpNwPGRjIHTSrK9OHRVHZlSm0SpMPg1DRueJC12+Xg5RPJFWhIMSALq5++dV8XAF
    DyZi+T7xomh1QgbIJcjnVqR10whjlMsaUIjGSgEzwel/VSjZEdF+ZfFQFIPdYw8=
    | X-Complaints-To:
    | NNTP-Posting-Date: Tue, 15 Sep 2009 03:51:00 +0000 (UTC)
    | X-Auth-Sender: U2FsdGVkX1+VeXgV2jtqGaLLOs5z4IvC
    | X-Face:
    ##]f7H~orlr/gyFVYSc6%m4O'cTo^&If?}IW615UF!<uRe-9yMRATG/{4TIj'-$q.LKD+H'?\>N8
    "|luhm6~c}@@VnH{8YEM%4Vc3dV.8KBSe`NJ![V&oZz=Ek7)_3;hFh4Z@t?_#r_\Ol/t70l2(=Br
    VfhWP[jcTK'VUf_|$zY$*=Rc%YE]'aqo57"~n6h6zN.:MC!Wzfa\0'Q@L3}#fFcI5
    | Cancel-Lock: sha1:cg6hJNWNI2g15kJpISCj1+WEG9M=
    | User-Agent: Xnews/2006.03.14
    | Path:
    TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTFEEDS01.phx.gbl!newsfeed0
    0.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.
    de!feeder.eternal-september.org!eternal-september.org!not-for-mail
    | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.inetserver.asp.general:10959
    | X-Tomcat-NG: microsoft.public.inetserver.asp.general
    |
    | Gazing into my crystal ball I observed
    | (Vince Xu [MSFT]) writing in
    | news:p:
    |
    | > Hello Adrienne,
    | >
    | > Thanks for your suggestion.
    |
    | What suggestion? Please quote relavent text in your replies. Remember,
    | not all news servers have the same retention. Someone could be reading
    | this and not have access to the original message.
    |
    | > But for our process, I need to use such
    | > signature in my first reply. Because we need to let the customer know
    | > some points about newsgroup.
    |
    | No, you don't. This is usenet, and these are not necessarily microsoft
    | customers.
    |
    | Usenet is a discussion system, not a 24/7 help desk. If someone posting
    | here happens to find an answer to a question within the discussion, then
    | that's a good thing, but it's not a guarantee.
    |
    | True, it's a microsoft.public group, but it's still usenet, and there
    | are still conventions to follow.
    |
    | > However, we will use the abbreviated signature after the first post.
    | >
    | > Regards,
    | >
    | > Vince Xu
    | >
    | > Microsoft Online Support
    | >
    | >
    |
    | And you still have not fixed your signature. A signature should be two
    | dashes and a space followed by a carriage return. You see, had you used
    | a proper signature, my news client would automatically have stripped
    | your signature.
    |
    | If you use a conforming news client, upon replying to this post, my
    | signature will magically disappear!
    |
    | --
    | Adrienne Boswell at Home
    | Arbpen Web Site Design Services
    | http://www.cavalcade-of-coding.info
    | Please respond to the group so others can share
    |
    |
    Vince Xu [MSFT], Sep 17, 2009
    #7
  8. Dear usenet,

    If you have further more to discuss about the signature issue, please mail
    to me directly. So that I can forword it to my techlead.




    --
    Regards,
    Vince
    Microsoft Online Support

    --------------------
    | From: Adrienne Boswell <>
    | Newsgroups: microsoft.public.inetserver.asp.general
    | Subject: RE: Searching file in ASP
    | Date: Tue, 15 Sep 2009 03:51:00 +0000 (UTC)
    | Organization: arbpen.com
    | Lines: 50
    | Message-ID: <Xns9C86D41846F1arbpenyahoocom@188.40.43.213>
    | References: <>
    <>
    <Xns9C863C5CA30arbpenyahoocom@188.40.43.213>
    <>
    | X-Trace: news.eternal-september.org
    U2FsdGVkX1/7vpNwPGRjIHTSrK9OHRVHZlSm0SpMPg1DRueJC12+Xg5RPJFWhIMSALq5++dV8XAF
    DyZi+T7xomh1QgbIJcjnVqR10whjlMsaUIjGSgEzwel/VSjZEdF+ZfFQFIPdYw8=
    | X-Complaints-To:
    | NNTP-Posting-Date: Tue, 15 Sep 2009 03:51:00 +0000 (UTC)
    | X-Auth-Sender: U2FsdGVkX1+VeXgV2jtqGaLLOs5z4IvC
    | X-Face:
    ##]f7H~orlr/gyFVYSc6%m4O'cTo^&If?}IW615UF!<uRe-9yMRATG/{4TIj'-$q.LKD+H'?\>N8
    "|luhm6~c}@@VnH{8YEM%4Vc3dV.8KBSe`NJ![V&oZz=Ek7)_3;hFh4Z@t?_#r_\Ol/t70l2(=Br
    VfhWP[jcTK'VUf_|$zY$*=Rc%YE]'aqo57"~n6h6zN.:MC!Wzfa\0'Q@L3}#fFcI5
    | Cancel-Lock: sha1:cg6hJNWNI2g15kJpISCj1+WEG9M=
    | User-Agent: Xnews/2006.03.14
    | Path:
    TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTFEEDS01.phx.gbl!newsfeed0
    0.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.
    de!feeder.eternal-september.org!eternal-september.org!not-for-mail
    | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.inetserver.asp.general:10959
    | X-Tomcat-NG: microsoft.public.inetserver.asp.general
    |
    | Gazing into my crystal ball I observed
    | (Vince Xu [MSFT]) writing in
    | news:p:
    |
    | > Hello Adrienne,
    | >
    | > Thanks for your suggestion.
    |
    | What suggestion? Please quote relavent text in your replies. Remember,
    | not all news servers have the same retention. Someone could be reading
    | this and not have access to the original message.
    |
    | > But for our process, I need to use such
    | > signature in my first reply. Because we need to let the customer know
    | > some points about newsgroup.
    |
    | No, you don't. This is usenet, and these are not necessarily microsoft
    | customers.
    |
    | Usenet is a discussion system, not a 24/7 help desk. If someone posting
    | here happens to find an answer to a question within the discussion, then
    | that's a good thing, but it's not a guarantee.
    |
    | True, it's a microsoft.public group, but it's still usenet, and there
    | are still conventions to follow.
    |
    | > However, we will use the abbreviated signature after the first post.
    | >
    | > Regards,
    | >
    | > Vince Xu
    | >
    | > Microsoft Online Support
    | >
    | >
    |
    | And you still have not fixed your signature. A signature should be two
    | dashes and a space followed by a carriage return. You see, had you used
    | a proper signature, my news client would automatically have stripped
    | your signature.
    |
    | If you use a conforming news client, upon replying to this post, my
    | signature will magically disappear!
    |
    | --
    | Adrienne Boswell at Home
    | Arbpen Web Site Design Services
    | http://www.cavalcade-of-coding.info
    | Please respond to the group so others can share
    |
    |
    Vince Xu [MSFT], Sep 17, 2009
    #8
  9. Dear usenet,
    I found many MSFT and customers didn't use dash-dash-space format of
    signature. Is that trouble? If you say it is not a proper format, but we
    didn't recieve any formal notify about it. I've append these charators. But
    I think you will encounter the same trouble on other customers/MSFT.
    So, if you have more to discuss, please mail to me directly:
    .
    I'll let my techlead to know about it.

    --
    Regards,
    Vince
    Microsoft Online Support

    | --------------------
    | | From: Adrienne Boswell <>
    | | Newsgroups: microsoft.public.inetserver.asp.general
    | | Subject: RE: Searching file in ASP
    | | Date: Tue, 15 Sep 2009 03:51:00 +0000 (UTC)
    | | Organization: arbpen.com
    | | Lines: 50
    | | Message-ID: <Xns9C86D41846F1arbpenyahoocom@188.40.43.213>
    | | References: <>
    | <>
    | <Xns9C863C5CA30arbpenyahoocom@188.40.43.213>
    | <>
    | | X-Trace: news.eternal-september.org
    |
    U2FsdGVkX1/7vpNwPGRjIHTSrK9OHRVHZlSm0SpMPg1DRueJC12+Xg5RPJFWhIMSALq5++dV8XAF
    | DyZi+T7xomh1QgbIJcjnVqR10whjlMsaUIjGSgEzwel/VSjZEdF+ZfFQFIPdYw8=
    | | X-Complaints-To:
    | | NNTP-Posting-Date: Tue, 15 Sep 2009 03:51:00 +0000 (UTC)
    | | X-Auth-Sender: U2FsdGVkX1+VeXgV2jtqGaLLOs5z4IvC
    | | X-Face:
    |
    ##]f7H~orlr/gyFVYSc6%m4O'cTo^&If?}IW615UF!<uRe-9yMRATG/{4TIj'-$q.LKD+H'?\>N8
    |
    "|luhm6~c}@@VnH{8YEM%4Vc3dV.8KBSe`NJ![V&oZz=Ek7)_3;hFh4Z@t?_#r_\Ol/t70l2(=Br
    | VfhWP[jcTK'VUf_|$zY$*=Rc%YE]'aqo57"~n6h6zN.:MC!Wzfa\0'Q@L3}#fFcI5
    | | Cancel-Lock: sha1:cg6hJNWNI2g15kJpISCj1+WEG9M=
    | | User-Agent: Xnews/2006.03.14
    | | Path:
    |
    TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTFEEDS01.phx.gbl!newsfeed0
    |
    0.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.
    | de!feeder.eternal-september.org!eternal-september.org!not-for-mail
    | | Xref: TK2MSFTNGHUB02.phx.gbl
    microsoft.public.inetserver.asp.general:10959
    | | X-Tomcat-NG: microsoft.public.inetserver.asp.general
    | |
    | | Gazing into my crystal ball I observed
    | | (Vince Xu [MSFT]) writing in
    | | news:p:
    | |
    | | > Hello Adrienne,
    | | >
    | | > Thanks for your suggestion.
    | |
    | | What suggestion? Please quote relavent text in your replies.
    Remember,
    | | not all news servers have the same retention. Someone could be reading
    | | this and not have access to the original message.
    | |
    | | > But for our process, I need to use such
    | | > signature in my first reply. Because we need to let the customer know
    | | > some points about newsgroup.
    | |
    | | No, you don't. This is usenet, and these are not necessarily microsoft
    | | customers.
    | |
    | | Usenet is a discussion system, not a 24/7 help desk. If someone
    posting
    | | here happens to find an answer to a question within the discussion,
    then
    | | that's a good thing, but it's not a guarantee.
    | |
    | | True, it's a microsoft.public group, but it's still usenet, and there
    | | are still conventions to follow.
    | |
    | | > However, we will use the abbreviated signature after the first post.
    | | >
    | | > Regards,
    | | >
    | | > Vince Xu
    | | >
    | | > Microsoft Online Support
    | | >
    | | >
    | |
    | | And you still have not fixed your signature. A signature should be two
    | | dashes and a space followed by a carriage return. You see, had you
    used
    | | a proper signature, my news client would automatically have stripped
    | | your signature.
    | |
    | | If you use a conforming news client, upon replying to this post, my
    | | signature will magically disappear!
    | |
    | | --
    | | Adrienne Boswell at Home
    | | Arbpen Web Site Design Services
    | | http://www.cavalcade-of-coding.info
    | | Please respond to the group so others can share
    | |
    | |
    |
    |
    Vince Xu [MSFT], Sep 17, 2009
    #9
  10. Gazing into my crystal ball I observed
    (Vince Xu [MSFT]) writing in
    news::

    > Dear usenet,
    > I found many MSFT and customers didn't use dash-dash-space format of
    > signature. Is that trouble? If you say it is not a proper format, but
    > we didn't recieve any formal notify about it. I've append these
    > charators. But I think you will encounter the same trouble on other
    > customers/MSFT. So, if you have more to discuss, please mail to me
    > directly: .
    > I'll let my techlead to know about it.
    >


    There, you see, your huge signature magically disappeared - and because
    you top posted, the complete thread disappeared as well. Top posting is
    very much frowned upon.

    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing in usenet?

    Please understand, you are posting to a public usenet group, the
    operative word being PUBLIC. You are probably not going to receive any
    formal notifications about posting and signatures, other than what you
    might read here.

    And no, I'm not going to email you. This is a public newsgroup, so the
    public should see my response. Perhaps someone else at MSFT will learn
    a thing or two.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Sep 18, 2009
    #10
    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. Gary

    XP file Searching

    Gary, Jan 24, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    328
    Steven Cheng[MSFT]
    Jan 28, 2004
  2. Replies:
    1
    Views:
    341
  3. Terence Parker

    Searching file tree for redundancies

    Terence Parker, Apr 20, 2004, in forum: HTML
    Replies:
    1
    Views:
    309
    brucie
    Apr 20, 2004
  4. drew
    Replies:
    6
    Views:
    167
  5. stumblng.tumblr
    Replies:
    1
    Views:
    192
    stumblng.tumblr
    Feb 4, 2008
Loading...

Share This Page