简体   繁体   English

显示文件夹内的文件扩展名

[英]Showing the File Extensions inside the folder

Currently, I am working on a feature that will make the files inside the folder that will not hide the file extensions using this code.目前,我正在开发一项功能,该功能将使文件夹中的文件不会使用此代码隐藏文件扩展名。

Imports Microsoft.Win32

Sub SetNoDrives(value As Integer, path as string)
  Dim RegPath As String = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]"
    Using Key As RegistryKey = Registry.LocalMachine.OpenSubKey(RegPath)
        Key.SetValue("HideFileExt", value, RegistryValueKind.DWord)
    End Using
End Sub

the problem is, I don't know where to place the string path (folder path) on the code.问题是,我不知道将字符串path (folder path)放在代码的什么位置。 the path is the specific location where you will always show the file extensions of the files inside the folder.路径是您将始终显示文件夹内文件的文件扩展名的特定位置。

Any help will be much appreciated.任何帮助都感激不尽。

The reason you don't know where to put the folder path is because there is nowhere to put the folder path.你不知道把文件夹路径放在哪里的原因是因为没有地方放文件夹路径。 This is a user-wide option, ie either extensions are displayed in every folder or no folder for the current user.这是一个用户范围的选项,即扩展名显示在每个文件夹中,或者当前用户不显示任何文件夹。 You don't get to choose on a folder by folder basis.您不能逐个文件夹进行选择。 At least, there is no option in Windows/File Explorer to do that and I've never seen mention of it being possible, even when specifically searching for it.至少,Windows/文件资源管理器中没有选项可以做到这一点,而且我从未见过有人提到它是可能的,即使是在专门搜索它时也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM