键盘忍者:在Windows中使用快捷键切换文件扩展名显示

Have you ever wanted to be able to easily toggle the visibility of file extensions? We’ve shown you how to toggle hidden files before, and now we’ve come up with a similar solution for file extensions.

您是否曾经想过能够轻松切换文件扩展名的可见性? 之前,我们已经向您展示了如何切换隐藏文件 ,现在我们针对文件扩展名提出了类似的解决方案。

If hotkeys are your game, be sure and check out our 21 keyboard shortcut articles.

如果热键是您的游戏,请确保并查看 我们的21个键盘快捷键文章

Toggle File Extensions

切换文件扩展名

Once you’ve downloaded and run the application, all you need to do is hit the Win+Y shortcut key while you have any folder open:

下载并运行该应用程序后,您需要做的就是在打开任何文件夹时按下Win + Y快捷键:

image

And you’ll immediately see the file extensions, or won’t see them – the point is that it will toggle between the two settings.

而且您会立即看到文件扩展名,或者看不到文件扩展名–关键是它会在两个设置之间切换。

image

Using the same hotkey sequence you can bring the file extensions back.

使用相同的热键顺序,您可以恢复文件扩展名。

Installing the Hotkey

安装热键

To make this run at startup, you have to save and extract the downloadable file, and then create a shortcut in your startup folder, which can be accessed by putting the following into the location bar:

要在启动时运行此程序,必须保存并解压缩可下载的文件,然后在启动文件夹中创建一个快捷方式,可通过将以下内容放入位置栏中来访问该快捷方式:

shell:startup

shell:启动

You’ll notice the ToggleFileExt item that I added into the startup folder.

您会注意到我添加到启动文件夹中的ToggleFileExt项。

image

There’s no UI for this application, and it’ll run completely in the background with fairly low memory usage.

该应用程序没有UI,它将在后台以较低的内存使用量完全运行。

image

Using the AutoHotkey Version

使用自动热键版本

If you are already an AutoHotkey user and would like to just add this to your current script, the full source code is here:

如果您已经是AutoHotkey用户,并且只想将其添加到当前脚本中,则完整的源代码在此处:

; WINDOWS KEY + Y TOGGLES FILE EXTENSIONS

; WINDOWS KEY + Y切换文件扩展名

#y::RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExtIf HiddenFiles_Status = 1 RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 0Else RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 1WinGetClass, eh_Class,AIf (eh_Class = “#32770” OR A_OSVersion = “WIN_VISTA”)send, {F5}Else PostMessage, 0x111, 28931,,, AReturn

#y :: RegRead,HiddenFiles_Status,HKEY_CURRENT_USER,Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced,HideFileExtIf HiddenFiles_Status = 1 RegWrite,REG_DWORD,HKEY_CURRENT_USER,Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced,HideFileDet,0 ,HKEY_CURRENT_USER,Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced,HideFileExt,1WinGetClass,eh_Class,AIf(eh_Class =“#32770”或A_OSVersion =“ WIN_VISTA”)发送,{F5}其他PostMessage,0x111、28931,回报

Note: If the script doesn’t work for you, you can grab a text version here.

注意:如果脚本不适合您,您可以在此处获取文本版本

This isn’t the type of utility that I would end up using all the time, but it works great as part of my regular AutoHotkey toolkit.

这不是我会一直使用的实用程序类型,但是它可以作为常规AutoHotkey工具箱的一部分很好地工作。

Download ToggleFileExt Hotkey Application

下载ToggleFileExt热键应用程序

翻译自: https://www.howtogeek.com/howto/windows-vista/keyboard-ninja-toggle-file-extension-display-with-a-shortcut-key-in-windows/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值