Click here to Skip to main content
15,905,563 members
Everything / DirectoryInfo

DirectoryInfo

DirectoryInfo

Great Reads

by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This is a simple trick to find file names of a particular file type existing in a folder.

Latest Articles

by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This is a simple trick to find file names of a particular file type existing in a folder.

All Articles

Sort by Score

DirectoryInfo 

29 May 2017 by OriginalGriff
It might be that you are checking the same folder regardless of what you get passed: DirectoryInfo dirInfo = new DirectoryInfo(@"C:\NCIT"); Perhaps using folder instead might be better? Do note that ReadOnly only applies to files in a folder, not to the folder itself - you will always get False...
24 Jun 2014 by CPallini
Folders contain files. You cannot write anything but files inside folders.
30 Nov 2014 by Seyed Ahmad Mirzaee
hi allin htaccess we able to prevent from Indexing file of DirectoryOptions -Indexesbut i need for asp.Nethtaccess file use in php but i need in Asp.NetThanks so Much
30 Nov 2014 by DamithSL
you can set this on your web config file, check below sample web config if you want to enable directory browsing set directoryBrowse as true, if you host your web application in IIS you can follow the below steps...
16 Dec 2014 by Kinna-10626331
Hello I have 3 projects in one solution ( 2 WPF projects and one C# empty Project theme).Also they have references to different .dlls .My problem is : 2 executables ( from one of the 2 WPF projects ) and multiple .dlls are been generated in the bin/debug and bin/release directories. Looks...
16 Dec 2014 by TheRealSteveJudge
Maybe this article might help you:Load DLL From Embedded Resource[^]
6 Apr 2015 by OriginalGriff
In order to store subdirectories, you have to use the appropriate overload which reads all files, or arrange your Dir class to both store hierarchical information (by containing a list of Dir instances) and recursively parse the folders to build up the information.However, you will not...
30 Sep 2015 by SM Mustafa
Dear Sir/Mam...!Any one please help me how to create a web page which shows the files in a specific folder in a gridview and enable to filter the result by name.Thanks in advance
14 Dec 2015 by rvjagadheesh
Hi, I believe there might be problems with IIS Authentication in DirectoryEntry object. Can you please addDirectoryEntry.AuthenticationType = AuthenticationTypes.Encryptionand see if your issue is resolved. Starting Windows Server 2003 SP1, all remote IIS communication needs to...
18 Jan 2016 by pmcm
I resolved this issue by rewriting the methods using the Microsoft.Web.Administration.dll see this thread on another forum I opened.Dynamically load Microsoft.Web.Administration.dll | The ASP.NET Forums
29 May 2017 by abdul subhan mohammed
Dear all, I'm create windows application in C#, where i'm automating windows. Currently i'm trying to achieve, Directory/folder attributes(Readonly/hidden/archive). Below is my code which always return "DirAttributes = Directory" only, even though I set the folder properties to...
21 Jun 2018 by hardiik
Hello I am looking for C# code where I give specific file/directory name, I can get list of information about applications and programs accessed that file in Windows..! What I have tried: I've tried with Filesystemwatcher available in VS
21 Jun 2018 by OriginalGriff
You can't - windows does not keep a record of what applications accessed which file by default. You may find this interesting though: Auditing File Access on File Servers – Premier Field Engineering[^]
2 Jun 2022 by pmcm
I have an application that deploys code to various target servers. Recently Windows 2012 servers have been added as target servers but the application's agent service (which is installed as a service on each target) returns an 'Access denied' message when trying to perform any tasks linked to...
26 Feb 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This is a simple trick to find file names of a particular file type existing in a folder.
26 Mar 2016 by Serdar UZUN
I am brand-new in C# and I wanna do that in C#.Can you show me the way :) - Enter a remote machine hostname- get list folder names in C directory from the remote machine- select folder names from the list- delete the selected folders- show a message about the process (deleted or...
6 Apr 2015 by vikaskallidantheyil
helloin one of my application i want to show the directories, sub directories and files which is present in a remote computer through winforms. is ther any control to accomplish this ??and also before populating it to a controll i would like to store the info of dir, subdir and files in...
15 Nov 2023 by Member 16140669
For the permission error "Filename: redirection.config\r\nError: Cannot read configuration file due to insufficient permissions\r\n\r\n", I added a new user called IIS IUSRS (put it in the name check area and check it to get the correct name) and...
24 Jun 2014 by Asmita_mittal
we have always seen saving text in a file first and then those files are saved in a folder. can we directly save some text into a folder. if yes then how ?
16 May 2015 by Behnam Mohammadi
hii wanna take some pictures with my app the after user install that in first run those files copy to internal storage but i don't know where should i put my pictures i try to put it into Asset folder but now i can't copy that into internal storage.i try this code:class bgTask extends...
26 Mar 2016 by Sergey Alexandrovich Kryukov
There is no such thing as " C directory from the remote machine". There even no such thing as "C directory", even on your local machine. And, just to dismiss the though completely, even on your local Windows system, event the volume "C:" may or may not exist. The whole idea is wrong; this is not...