» How to get a path to the desktop for current user in C#?
How to get a path to the desktop for current user in C#?
|March 11, 2009
Posted by forumadmin
How do I get a path to the desktop for current user in C#?
The only thing I could find was the VB.NET-only class
SpecialDirectories, which has this property:
How can I do this in C#?
More Related Questions
- Getting file move datetime When you copy a file (in a windows environment), the Creation and LastAccess datetime are modified and can be retrieved with a FileInfo object.
However, I can't find any reliable datetime […]
- server.mappath("."), server.mappath("~"), server.mappath(@"\"), server.mappath("/"). What is the difference? Can anyone explain the difference between Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\") and Server.MapPath("/")? Asked By - […]
- How check if given string is legal (allowed) file name under Windows? I want to include batch file rename functionality in my application. User can type destination filename pattern and (after replacing some wildcards in pattern) I need to check if it's […]
- What file system supports both Mac and Windows while retaining file permission Currently, I have a Mac. I am setting up a share drive which is accessible from both Mac and Windows. However, using exFat for the file system does not retain the file permissions of the […]
- How do you get a directory listing sorted by creation date in python? What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine? Asked By - […]
- How to find the real user home directory using python? I see that if we change the HOME(linux) or USERPROFILE(windows) environmental variable and run a python script, it returns the new value as the user home when I […]
- .NET How to compare two Strings that represent filenames ignoring case correctly Given that (at least on NTFS) the filesystem on Windows is case insensitive, I would like to compare String fileA to String fileB as such:
- How do I get the directory from a files full path? What is the simplest way to get the directory that a file is in? I'm using this to set a working directory.
string filename = "C:\MyDirectory\MyFile.bat"
In this example, I should get […]
- Getting the .NET Framework directory path How can I obtain the .NET Framework directory path inside my C# application?
The folder that I refer is "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" Asked By - […]
- any reason to call fsync before a call to fstat I have a piece of legacy code that issues a call to fsync before a call to fstat to determine the filesize of the target file. (specifically the code is only accessing st_size out of the […]