|
-
Apr 26th, 2005, 10:36 PM
#1
Thread Starter
New Member
Change folder view to show-hidden-files [RESOLVED-one last question]
Hello, i was just wondering if there was a way in .NET to edit a registry entry and push the changes through... basically what i want to do is, i have my program that recursivly searches all sub directories and sub directories of those, and every file, it counts them to see how many files are contained within a directory tree. Now, what i want to do is, if the computer you are on, does not have the "Show Hidden Files and Folders" option on, i want to turn it on, and force an update so that my recursive search will pick up all possible files. Because i noticed that when files are hidden, it wont count them. So i know for a fact i could find out in the registry where this option changes when you physically change it in an explorer window. But how would you go about forcing the update so that it will "Apply" it so to speak... if i am un clear of my objective, please email me, or reply. This is very important. If there is a way to do it other than the registry, please let me know. Thanks in advance.
Last edited by shmickz; Apr 26th, 2005 at 11:53 PM.
-
Apr 26th, 2005, 11:25 PM
#2
Re: Change folder view to show-hidden-files
I dont think that will solve the issue. You need to search using certain parameters to include hidden and system files, etc.
Post some code for us so we can help.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 26th, 2005, 11:51 PM
#3
Thread Starter
New Member
Re: Change folder view to show-hidden-files
Thank you very much for your prompt reply. This was my mistake, after you told me this, i tried some off the wall search patterns like vbHidden, just to try, but in testing, I found that weather I had them hidden or visible, the following snippet of code will find hidden or non files, in hidden or non hidden folders... thanks again for the reply, it did help... also btw, do you still know of a way after i change something like that in the registry, such as an option like that, or possibly like the desktop wallpaper, to force the update just like you were hitting the "apply" button.
The following assumes you imported: System.IO
VB Code:
Private Function GetFiles(ByVal oFolder As String) As ArrayList
Dim FileName As String
Dim arrFiles As New ArrayList
For Each FileName In Directory.GetFiles(oFolder)
Dim FInfo As New FileInfo(FileName)
arrFiles.Add(FInfo.FullName)
Next
Return arrFiles
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|