Special Paths

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mythran

    Special Paths

    Besides looking up the actual registry values, are there any direct ways of
    retrieving the path to the following folders?

    (Default installation on WinXp)
    C:\Windows\Micr osoft.Net
    C:\Windows\Micr osoft.Net\Versi on\
    C:\Windows\Micr osoft.Net\Versi on\Config
    C:\Windows\Micr osoft.Net\Versi on\Temporary ASP.Net Files



    One of the things I want to do (there are more, just explaining one of them)
    is to recursively delete all of the files in Temporary ASP.Net Files. This
    application that I wrote does this already but I am hardcoding the path to
    the Temporary ASP.Net Files in it...this app is just a small utility program
    for me to use to clean out all temporary files (Temp files, Internet Cache,
    et cetera).

    :)

    Thanks in advance! :)

    Mythran

  • Amalorpavanathan Yagulasamy(AMAL)MCP,MCS

    #2
    RE: Special Paths

    You can recursively delete all files using Directory class.
    Refer the following URL,




    --
    Regards,
    Amal [MCP, MCS]
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!



    "Mythran" wrote:
    [color=blue]
    > Besides looking up the actual registry values, are there any direct ways of
    > retrieving the path to the following folders?
    >
    > (Default installation on WinXp)
    > C:\Windows\Micr osoft.Net
    > C:\Windows\Micr osoft.Net\Versi on\
    > C:\Windows\Micr osoft.Net\Versi on\Config
    > C:\Windows\Micr osoft.Net\Versi on\Temporary ASP.Net Files
    >
    >
    >
    > One of the things I want to do (there are more, just explaining one of them)
    > is to recursively delete all of the files in Temporary ASP.Net Files. This
    > application that I wrote does this already but I am hardcoding the path to
    > the Temporary ASP.Net Files in it...this app is just a small utility program
    > for me to use to clean out all temporary files (Temp files, Internet Cache,
    > et cetera).
    >
    > :)
    >
    > Thanks in advance! :)
    >
    > Mythran
    >
    >[/color]

    Comment

    • Mythran

      #3
      Re: Special Paths


      "Amalorpavanath an Yagulasamy(AMAL )MCP,MCS"
      <Amalorpavanath anYagulasamyAMA LMCPMCS@discuss ions.microsoft. com> wrote in
      message news:9D2978D9-B4FD-4299-8974-879F496CB73B@mi crosoft.com...[color=blue]
      > You can recursively delete all files using Directory class.
      > Refer the following URL,
      > http://support.microsoft.com/default...;en-us;Q303974
      >
      > http://www.codeproject.com/csharp/DeleteOld.asp
      >
      > --
      > Regards,
      > Amal [MCP, MCS]
      > http://geocities.com/techsharing
      >
      >[/color]

      Yeah, I know ;P

      But I need the path to delete :) I don't want to read from the registry if
      there is a way to get the paths specified in my original post.

      Thanks so far..

      Mythran

      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: Special Paths

        Mythran,

        AFAIK, there is no way through managed code to get the install directory
        of .NET. You will have to resort to reading the registry for the versions
        of the runtime installed, and the directories where they are installed.

        Hope this helps.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "Mythran" <kip_potter@hot mail.comREMOVET RAIL> wrote in message
        news:e7rRhJGaFH A.3280@TK2MSFTN GP09.phx.gbl...[color=blue]
        > Besides looking up the actual registry values, are there any direct ways
        > of retrieving the path to the following folders?
        >
        > (Default installation on WinXp)
        > C:\Windows\Micr osoft.Net
        > C:\Windows\Micr osoft.Net\Versi on\
        > C:\Windows\Micr osoft.Net\Versi on\Config
        > C:\Windows\Micr osoft.Net\Versi on\Temporary ASP.Net Files
        >
        >
        >
        > One of the things I want to do (there are more, just explaining one of
        > them) is to recursively delete all of the files in Temporary ASP.Net
        > Files. This application that I wrote does this already but I am
        > hardcoding the path to the Temporary ASP.Net Files in it...this app is
        > just a small utility program for me to use to clean out all temporary
        > files (Temp files, Internet Cache, et cetera).
        >
        > :)
        >
        > Thanks in advance! :)
        >
        > Mythran
        >[/color]


        Comment

        Working...