473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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\Microsoft.Net
C:\Windows\Microsoft.Net\Version\
C:\Windows\Microsoft.Net\Version\Config
C:\Windows\Microsoft.Net\Version\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

Nov 17 '05 #1
3 1187
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
"Mythran" wrote:
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\Microsoft.Net
C:\Windows\Microsoft.Net\Version\
C:\Windows\Microsoft.Net\Version\Config
C:\Windows\Microsoft.Net\Version\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

Nov 17 '05 #2

"Amalorpavanathan Yagulasamy(AMAL)MCP,MCS"
<Am**********************************@discussions. microsoft.com> wrote in
message news:9D**********************************@microsof t.com...
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


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

Nov 17 '05 #3
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]
- mv*@spam.guard.caspershouse.com

"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:e7**************@TK2MSFTNGP09.phx.gbl...
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\Microsoft.Net
C:\Windows\Microsoft.Net\Version\
C:\Windows\Microsoft.Net\Version\Config
C:\Windows\Microsoft.Net\Version\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

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Timothy Madden | last post by:
Hello all I'm trying to include some files in an included file. Think of some scripts like this /index.php /scripts/logging.php /scripts/config.php /scripts/db_access.php
5
by: Noah | last post by:
Does anyone have a function to convert back and forth between NT style paths and POSIX style? It seems trivial, but I want to make sure I don't overlook some obscure detail. Is it a simple matter...
8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
0
by: Chris Gill | last post by:
I'm trying to use cookieless sessions in asp.net using the InProc mode (for various reasons it is not desirable for us to use the other modes if it is possible to avoid them). My problem revolves...
12
by: Quemasda | last post by:
Hi, The application I'm working on should set the Special Folders (Favorites, My Documents, ...) but I can't find the way to do it. So far, I've been able to get the path of those Special...
3
by: JeffDotNet | last post by:
I wrote a small data processing application that writes a summary of several hundred files. I use drag and drop on a panel (Panel1) to grab the absolute path to each of these files. Then I begin...
5
by: costantinos | last post by:
Hello. I have implemented the Dijkstra shortest path algorithm, it works fine but I have one question on how I can improve something. I want to find all the possible shortest paths from a node...
12
by: wheels619 | last post by:
How can I get access for another user's special folder locations? A configuration file is stored in the users' appData folder and the program altering it will be ran under the admin.
6
by: Jon Slaughter | last post by:
do I have to prefix every absolute path with document root to get it to work? For some reason I thought that prefixing a path with '/' or './' with make it absolute w.r.t to document root but I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.