473,396 Members | 1,706 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,396 software developers and data experts.

Special Folders

I want the initial directory of my save file dialog to be the My Documents folder. I know that that can vary, so is there a class that contains these special folder? What I would like is

OpenFileDialog.InitialDirectory = Class.MyDocuments
Nov 16 '05 #1
2 9983
Bill,
I know that that can vary, so is there a class that contains these special folder?


System.Environment.GetFolderPath()

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #2
Take a look at Environment.SpecialFolder. I believe it's the one called
"personal" you are looking for.

HTH

Yves

"Bill English" <an*******@discussions.microsoft.com> schreef in bericht
news:0B**********************************@microsof t.com...
I want the initial directory of my save file dialog to be the My Documents folder. I know that that can vary, so is there a class that contains these
special folder? What I would like is:
OpenFileDialog.InitialDirectory = Class.MyDocuments

Nov 16 '05 #3

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

Similar topics

1
by: Colin Steadman | last post by:
I'm just starting out writing Python scripts (in PSP), and need to find the location of Windows special folders such as 'My Documents' and 'Desktop' so that I can save files in the right place. Is...
1
by: Howard | last post by:
Hello all. On a file or folder object in Windows 2000/2003, it is possible to edit the standard Change, RW etc permissions and give "special" permissions. These special permissions do things...
1
by: news.microsoft.com | last post by:
I'm researching ways to locate so-called special folders such as "My Documents", "<username>\Application Data", etc. I've found references to Application.CommonAppDataPath(), etc, but those are...
2
by: Bob Hanson | last post by:
Hello All, I noticed in the ASP.NET beta 2 that we have more special folders. Can I get some clarification regarding these folders? I am just making sure of the intent. Thanks in advance, ...
1
by: Jim Haynes | last post by:
Does anyone know of a simple way to retrieve WITH CODE the path to special folders such as the 'My Documents' or 'Application Data' folders. I can do it with api calls using sffolder, etc but I...
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...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
1
by: Andrea | last post by:
I need to get the description (with the default language of the operating system) for the special system folders like Control Panel, My Computer and so on. I have the CLSID of them and, for...
3
by: DCC | last post by:
I need to resolve Windows special folders. From what I have read it would seem that using CSIDL's and SHGetSpecialFolderPath and SHGetFolderPath was the way to accomplish that in VB6 and VB.NET. ...
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.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.