The forum of documents and methods for study - Lượm lặt kiến thức


Anh hùng bàn phím: Công cụ ẩn/hiện file ẩn bằng phím tắt

Share

Admin

Male Libra Monkey
Tổng số bài gửi : 1272
Tiền xu Ⓑ : 3343
Được cảm ơn № : 3
Ngày khởi sự Ngày khởi sự : 2013-01-07
Đến từ Đến từ : HCMC
Côngviệc / Sởthix Côngviệc / Sởthix : Languages, Softwares, Sciences, Martial arts
on 24th July 2016, 11:19

Keyboard Ninja: Toggle Hidden Files with a Shortcut Key in Windows



We’ve written a very long time ago about how to toggle hidden files in Ubuntu with a simple shortcut key. But what about keyboard ninjas using Windows instead? After doing some research, I’ve got a simple downloadable solution for you.
What I’ve done is throw together a very simple application that runs in the background and assigns the hotkey Win+H to toggle hidden files. There’s no user interface to keep it from wasting memory, but you can always customize it using the AutoHotkey script provided below instead.
Note: This application was based on an AutoHotkey script created by Lifehacker commenter turnersd, fully credited below.

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

And presto! You’ll immediately see any hidden files in that folder, or any folders that are open.
 
Hit the same hotkey sequence again, and the hidden folders will disappear again. Very useful!
Installing the Hotkey
In order to install this and set it up to run at startup, you’ll need to save and extract the downloadable file, and then create a shortcut in your startup group, which you can easily access by typing the following into the location bar:

shell:startup


You could even just copy the executable in… but either way, once you’ve done that, you can double-click on it to start it.

Note that there’s no UI for this application, it runs completely in the background to limit memory usage as much as possible.
Killing the Process
Because there’s no UI, if you want to stop the application from running, you’ll need to either reboot… or use the much simpler method of opening Task Manager, finding the ToggleHiddenFiles.exe process and killing it.

Using the AutoHotkey Script Instead
The method for creating the hotkey isn’t something that I can take credit for… the credit should be fully given to Lifehacker commenter turnersd in this article about toggling hidden files with a shortcut.
Here’s the source code, which you can copy into an AutoHotkey script file:


Code:
; WINDOWS KEY + H TOGGLES HIDDEN FILES 
#h:: 
RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden 
If HiddenFiles_Status = 2  
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1 
Else  
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2 
WinGetClass, eh_Class,A 
If (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA") 
send, {F5} 
Else PostMessage, 0x111, 28931,,, A 
Return


If you have problems with this source, you can also grab it from the textsnip site.
Downloadable Application
Just remember to extract this file and save it somewhere where it won’t be deleted later. I usually create a folder under my user directory for applications and save them there.
Download ToggleHiddenFiles Hotkey Application

howtogeek.com


Last edited by QaniTri on 30th July 2016, 11:45; edited 2 times in total

Admin

Male Libra Monkey
Tổng số bài gửi : 1272
Tiền xu Ⓑ : 3343
Được cảm ơn № : 3
Ngày khởi sự Ngày khởi sự : 2013-01-07
Đến từ Đến từ : HCMC
Côngviệc / Sởthix Côngviệc / Sởthix : Languages, Softwares, Sciences, Martial arts
on 24th July 2016, 11:20

Tutorial Thursday




One of the things that I’ve always done on my Windows computers is have them show all of the hidden files. Some people think I’m crazy because this adds a lot more clutter, but it always seemed as though I frequently had to access files there were otherwise hidden. Sure I liked when some files were out-of-sight because I only ever mess with a handful of them, but the hassle of going into the Windows Explorer options every time I needed to see some hidden files just wasn’t worth it.
After a little research I had come across an article on the PCWorld forum that outlined how I could create a shortcut that would enable or disable hidden files on the fly. If the setting is enabled it would disable it when run, and vice versa. It’s one shortcut that serves as an on/off switch for hidden files. Here’s how you do it:

[list="color: rgb(68, 68, 68); font-family: Arial, Helvetica, Clean, sans-serif; font-size: 16px; line-height: 20.8px; background-color: rgb(255, 255, 255);"]
[*]Open up Notepad and paste in the following text:
Code:
Set sh = CreateObject("WScript.Shell")
theKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
setHidden = sh.RegRead(theKey)
If setHidden = 1 Then
setHidden = 0
MsgBox "System and hidden files will no longer appear in Explorer.",64,"Hidden File Exchange"
Else
setHidden = 1
MsgBox "System and hidden files will appear in Explorer.",64,"Hidden File Exchange"
End If
sh.RegWrite theKey,setHidden,"REG_DWORD"
Set sh = Nothing


[*]Save the file with any name you want, but make sure to designate the extension to be “.vbs”:


[*]Run the file that you just saved. Give it a few seconds to take affect, but you should see the results without even having to restart Windows Explorer.

[*]If you want you can place this script file anywhere you’d like on your computer, and then you can create a shortcut to it by right-clicking on the file. I recommend placing a shortcut to the file in the Windows Explorer Favorites for fast access from the Favorites menu.

[/list]
Compatibility: I’ve verified that this works on Windows XP, but it only works on Vista when User Account Control (UAC) is disabled. This is because it needs access to the registry, and Vista doesn’t allow that unless it is run as an administrator. Since it is a VBS file the “Run as Administrator” option does not appear when right-clicking on the file.
By default the script will prompt you with the current setting for the hidden files each time you run the script. That way you know whether you are turning them on or off. If you don’t want to see the prompts just remove the following two lines that I’ve highlighted in the code:
Now you are all set with a shortcut that can enable or disable hidden files in Windows Explorer. This should help reduce the clutter you see on a regular basis by keeping the hidden files out-of-sight when they’re not needed, and then pulling them up when you need to make a change. How convenient is that?

cybernetnews.com

Admin

Male Libra Monkey
Tổng số bài gửi : 1272
Tiền xu Ⓑ : 3343
Được cảm ơn № : 3
Ngày khởi sự Ngày khởi sự : 2013-01-07
Đến từ Đến từ : HCMC
Côngviệc / Sởthix Côngviệc / Sởthix : Languages, Softwares, Sciences, Martial arts
on 24th July 2016, 11:26
The CyberNet blog has posted a seriously helpful cut-and-paste script that anyone can turn into a shortcut to turn Windows' hidden file showing on and off. Normally, showing hidden files—like folders named with a starting "." and configuration files—is accessed through the options in Windows Explorer windows or shell extension tools, but this Visual Basic script can be stashed anywhere and accessed from a keyboard shortcut. Great solution for those who alternate between showing and hiding hidden files.



Add Hidden File Showing, Other Right-Click Tools with Shell Tools
Windows only: Free shell extension utility Shell Tools adds a few rare-but-good abilities to your…Read more


Shortcut to Show/Hide Hidden Files [CyberNet]

lifehacker.com
    Flag Counter