.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> File Operation >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Access Program Files Folder Programatically

Posted By:Rahul       Posted Date: November 14, 2008    Points: 10    Category: File Operation    URL: http://www.dotnetspark.com  
 

If you want to access program files folder dynamically than .NET framework provide you special variable to access Program Files folder Dynamically called Environment variable. And its easy also along with Program files you also can access other special windows folder like My Docuemnt, My Music etc.

Lets see an example

// to access program files folder
Environment.SpecialFolder.ProgramFiles

//To acess MyMusic folder
Environment
.SpecialFolder.MyMusic

Similarly you can access other folders also

 

 


     

Further Readings:

Responses
Author: abhays         Company URL: http://www.dotnetspark.com
Posted Date: March 31, 2014

Great

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend