About 23,100,000 results
Open links in new tab
  1. How do I get the directory from a file's full path? - Stack Overflow

    If you are working with a FileInfo object, then there is an easy way to extract a string representation of the directory's full path via the DirectoryName property.

  2. c# - Getting file names without extensions - Stack Overflow

    Jan 26, 2011 · I dislike the DirectoryInfo, FileInfo for this scenario. DirectoryInfo and FileInfo collect more data about the folder and the files than is needed so they take more time and …

  3. How to use FileInfo object from Powershell - Stack Overflow

    May 4, 2017 · How to use FileInfo object from Powershell Asked 16 years, 10 months ago Modified 3 years, 2 months ago Viewed 60k times

  4. What is difference between File.Exists("") and FileInfo exists

    Feb 26, 2014 · 2 The difference between File.Exists() and new FileInfo().Exists on it's behavior when full path (directory name + file name) is long:

  5. .net - System.IO.FileInfo and Relative Paths - Stack Overflow

    Dec 7, 2021 · The underlying problem is that System.IO .NET methods, including the [System.IO.FileInfo]::new() constructor you're (implicitly) invoking, use …

  6. What is the difference between File and FileInfo in C#?

    File is optimized for one-off operations on a file, FileInfo is optimized around multiple operations on the same file, but in general there isn't that much difference between the different method …

  7. filesize - How do you get the file size in C#? - Stack Overflow

    I need a way to get the size of a file using C#, and not the size on disk. How is this possible? Currently I have this loop foreach (FileInfo file in downloadedMessageInfo.GetFiles()) { //file.

  8. Does FileInfo.Extension return the last *.* pattern, or something else?

    Oct 2, 2012 · Does FileInfo.Extension return the last *.* pattern, or something else? Asked 13 years, 3 months ago Modified 13 years, 3 months ago Viewed 29k times

  9. c# - Faster way to get multiple FileInfo's? - Stack Overflow

    Dec 4, 2010 · 5 .NET's DirectoryInfo and FileInfo classes are incredibly slow in this matter, especially when used with network shares. If many of the files to be "scanned" are in the same …

  10. How to get File Created Date and Modified Date - Stack Overflow

    Apr 23, 2014 · I have an .NET EXE file . I want to find the file created date and modified date in C# application. Can do it through reflection or with IO stream?