How to toggle Show/Hide hidden files in Windows through command line?
I often need to toggle between show/hide hidden files in my PC. I have been doing it the usual way,
- Click Organize in an Explorer window.
- Select Folder and search options.
- Switch to View tab.
- Toggle between Show/Hide Hidden files.
This method is so lengthy and I am tired of it.
I would like to toggle between them from the command line (cmd). Is there any way to achieve this?
Also, a way to toggle between Show/Hide System Files from the command line would be great.
windows-7 windows command-line system-file
add a comment |
I often need to toggle between show/hide hidden files in my PC. I have been doing it the usual way,
- Click Organize in an Explorer window.
- Select Folder and search options.
- Switch to View tab.
- Toggle between Show/Hide Hidden files.
This method is so lengthy and I am tired of it.
I would like to toggle between them from the command line (cmd). Is there any way to achieve this?
Also, a way to toggle between Show/Hide System Files from the command line would be great.
windows-7 windows command-line system-file
add a comment |
I often need to toggle between show/hide hidden files in my PC. I have been doing it the usual way,
- Click Organize in an Explorer window.
- Select Folder and search options.
- Switch to View tab.
- Toggle between Show/Hide Hidden files.
This method is so lengthy and I am tired of it.
I would like to toggle between them from the command line (cmd). Is there any way to achieve this?
Also, a way to toggle between Show/Hide System Files from the command line would be great.
windows-7 windows command-line system-file
I often need to toggle between show/hide hidden files in my PC. I have been doing it the usual way,
- Click Organize in an Explorer window.
- Select Folder and search options.
- Switch to View tab.
- Toggle between Show/Hide Hidden files.
This method is so lengthy and I am tired of it.
I would like to toggle between them from the command line (cmd). Is there any way to achieve this?
Also, a way to toggle between Show/Hide System Files from the command line would be great.
windows-7 windows command-line system-file
windows-7 windows command-line system-file
edited Dec 1 '16 at 16:32
Steven
23.5k1076109
23.5k1076109
asked Dec 1 '16 at 15:17
RogUERogUE
1,56342148
1,56342148
add a comment |
add a comment |
6 Answers
6
active
oldest
votes
Hidden files, folders or drives:
Add (or overwrite /f
) the value Hidden
to the registry key: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced
.
Show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
Don't show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
ToggleHiddenFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden | Find "0x2"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
goto end
:end
Hide protected operating system files (Recommended)
Checked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
Unchecked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
ToggleSystemFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden | Find "0x0"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
goto end
:end
Notes: Changes take place immediately. The program reg
requires admin privileges, so run the batch files as administrator.
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
2
@RogUE No, because the script is testing the result of thefind
command (whether0x2
or0x0
is present in the registry key).
– TripeHound
Dec 2 '16 at 9:11
1
It doesn't appear to be a typo: it's checking for the presence of0x0
; if it's found (find
returns0
) then it jumps toturnon
and sets the value to1
; if it's not found (find
returns1
) then it jumps toturnoff
and sets it to0
. Either it's an arbitrary choice (and the test could have beenfind 0x1
with thegoto
s reversed) or it might be (I haven't checked) that0x1
is present in theREQ QUERY
output in either case and so cannot be used to tell the two settings apart.
– TripeHound
Dec 2 '16 at 12:10
2
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
|
show 2 more comments
The property to show/hide hidden files is managed in the registry, so you would simply need a .reg file that simply toggles this property. Here is how you do it through registry:
- Type “regedit“, then press “Enter“.
- Navigate to the following location: HKEY_CURRENT_USER --> Software --> Microsoft --> Windows --> CurrentVersion --> Explorer --> Advanced
- Set the value for “Hidden” to “1” to show hidden files, folders, and drives.
- Set the value to “2” to not show hidden files, folders, and drives.
- Set the value for “ShowSuperHidden” to “1” to show protected operating system files. Set the value to “2” to not show protected operating system files.
If you give me a bit of time, I will write the REG file and post it here.
Edit: Steven seems to have posted an example script, so I won't build one.
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
add a comment |
Although not a command line function, here's a method on how to quickly open the window: Show hidden files and folders.
Caution: Review source information in Part 1 concerning Vista before proceeding.
Part 1: Create a folder that contains the object 'Show hidden files and folders'.
Part 2: Create a desktop shortcut of 'Show hidden files and folders'.
Part 3: Open the window for 'Show hidden files and folder'
After you have completed all 3 parts you will have a keyboard shortcut for quick access to the window for 'Show hidden files and folders'.
Part 1
- Right click a blank area of the desktop
- Click New
- Click Folder
- Name the folder: How-To Geek.{ED7BA470-8E54-465E-825C-99712043E01C}
Source: http://www.howtogeek.com/howto/8711/stupid-geek-tricks-enable-the-secret-how-to-geek-mode-in-windows/
Part 2:
- Open the How-To Geek folder you just created
- Click the arrow next to File Explorer Options if it's not already expanded
- Right click and drag to the desktop 'Show hidden files and folders'
- Click create shortcut here
Note: In this particular situation you could left click and drag, but it's always good practice to right click and drag to ensure you are performing the intended function, and because you can also click cancel if needed.
Part 3:
- Right click the shortcut folder on the desktop 'Show hidden files and folders'
- Click Properties
- On the Shortcut tab click in the Shortcut Key field
- Press something like Ctrl + Alt + T
- Click OK
- Press Ctrl + Alt + T and the 'Show hidden files and folders' will open
add a comment |
I know you arent using it but its worth considering the upgrade.
The process in Windows 10 is:
Alt + V
H
H
You need more keystrokes to open the command prompt in Windows 7.
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
add a comment |
A possibly more convenient way to accomplish this with minimal effort is through adding a context menu item, to do this:
- Create a new simple text document somewhere and name it "togglehidden.reg"
Open it with notepad and paste the following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
[HKEY_CLASSES_ROOTDirectoryBackgroundshellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
save and close.
- double click your new reg file, accept prompts to install it and you're done.
This is what you should get:
Hidden Toggle
Source: https://winaero.com/blog/hidden-items-context-menu-windows-10/
add a comment |
Thanks to Steven's reply, I could wrote software that toggles this (and refresh open explorer windows) with a single click: Link
Edit:
When the application is opened, it gets a value from the registry key (Hidden) here: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced.
Depending on the value, a hidden command prompt to change the value is executed. Thereafter every open windows explorer window is refreshed and hidden files/folders is hidden/shown.
It is available for vieweing in the source.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1151844%2fhow-to-toggle-show-hide-hidden-files-in-windows-through-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hidden files, folders or drives:
Add (or overwrite /f
) the value Hidden
to the registry key: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced
.
Show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
Don't show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
ToggleHiddenFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden | Find "0x2"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
goto end
:end
Hide protected operating system files (Recommended)
Checked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
Unchecked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
ToggleSystemFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden | Find "0x0"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
goto end
:end
Notes: Changes take place immediately. The program reg
requires admin privileges, so run the batch files as administrator.
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
2
@RogUE No, because the script is testing the result of thefind
command (whether0x2
or0x0
is present in the registry key).
– TripeHound
Dec 2 '16 at 9:11
1
It doesn't appear to be a typo: it's checking for the presence of0x0
; if it's found (find
returns0
) then it jumps toturnon
and sets the value to1
; if it's not found (find
returns1
) then it jumps toturnoff
and sets it to0
. Either it's an arbitrary choice (and the test could have beenfind 0x1
with thegoto
s reversed) or it might be (I haven't checked) that0x1
is present in theREQ QUERY
output in either case and so cannot be used to tell the two settings apart.
– TripeHound
Dec 2 '16 at 12:10
2
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
|
show 2 more comments
Hidden files, folders or drives:
Add (or overwrite /f
) the value Hidden
to the registry key: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced
.
Show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
Don't show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
ToggleHiddenFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden | Find "0x2"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
goto end
:end
Hide protected operating system files (Recommended)
Checked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
Unchecked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
ToggleSystemFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden | Find "0x0"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
goto end
:end
Notes: Changes take place immediately. The program reg
requires admin privileges, so run the batch files as administrator.
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
2
@RogUE No, because the script is testing the result of thefind
command (whether0x2
or0x0
is present in the registry key).
– TripeHound
Dec 2 '16 at 9:11
1
It doesn't appear to be a typo: it's checking for the presence of0x0
; if it's found (find
returns0
) then it jumps toturnon
and sets the value to1
; if it's not found (find
returns1
) then it jumps toturnoff
and sets it to0
. Either it's an arbitrary choice (and the test could have beenfind 0x1
with thegoto
s reversed) or it might be (I haven't checked) that0x1
is present in theREQ QUERY
output in either case and so cannot be used to tell the two settings apart.
– TripeHound
Dec 2 '16 at 12:10
2
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
|
show 2 more comments
Hidden files, folders or drives:
Add (or overwrite /f
) the value Hidden
to the registry key: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced
.
Show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
Don't show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
ToggleHiddenFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden | Find "0x2"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
goto end
:end
Hide protected operating system files (Recommended)
Checked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
Unchecked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
ToggleSystemFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden | Find "0x0"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
goto end
:end
Notes: Changes take place immediately. The program reg
requires admin privileges, so run the batch files as administrator.
Hidden files, folders or drives:
Add (or overwrite /f
) the value Hidden
to the registry key: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced
.
Show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
Don't show:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
ToggleHiddenFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden | Find "0x2"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Hidden /t REG_DWORD /d 2 /f
goto end
:end
Hide protected operating system files (Recommended)
Checked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
Unchecked:
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
ToggleSystemFiles.bat
REG QUERY "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden | Find "0x0"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
goto end
:turnoff
REG ADD "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
goto end
:end
Notes: Changes take place immediately. The program reg
requires admin privileges, so run the batch files as administrator.
edited Apr 5 '17 at 23:14
answered Dec 1 '16 at 15:27
StevenSteven
23.5k1076109
23.5k1076109
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
2
@RogUE No, because the script is testing the result of thefind
command (whether0x2
or0x0
is present in the registry key).
– TripeHound
Dec 2 '16 at 9:11
1
It doesn't appear to be a typo: it's checking for the presence of0x0
; if it's found (find
returns0
) then it jumps toturnon
and sets the value to1
; if it's not found (find
returns1
) then it jumps toturnoff
and sets it to0
. Either it's an arbitrary choice (and the test could have beenfind 0x1
with thegoto
s reversed) or it might be (I haven't checked) that0x1
is present in theREQ QUERY
output in either case and so cannot be used to tell the two settings apart.
– TripeHound
Dec 2 '16 at 12:10
2
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
|
show 2 more comments
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
2
@RogUE No, because the script is testing the result of thefind
command (whether0x2
or0x0
is present in the registry key).
– TripeHound
Dec 2 '16 at 9:11
1
It doesn't appear to be a typo: it's checking for the presence of0x0
; if it's found (find
returns0
) then it jumps toturnon
and sets the value to1
; if it's not found (find
returns1
) then it jumps toturnoff
and sets it to0
. Either it's an arbitrary choice (and the test could have beenfind 0x1
with thegoto
s reversed) or it might be (I haven't checked) that0x1
is present in theREQ QUERY
output in either case and so cannot be used to tell the two settings apart.
– TripeHound
Dec 2 '16 at 12:10
2
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
Don't you need to kill and restart the explorer.exe process for registry changes to actually get applied?
– Zoredache
Dec 1 '16 at 17:37
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
@Zoredache The settings take effect immediately either from the Folder Options and the registry change. Try it and see.
– Steven
Dec 1 '16 at 17:41
2
2
@RogUE No, because the script is testing the result of the
find
command (whether 0x2
or 0x0
is present in the registry key).– TripeHound
Dec 2 '16 at 9:11
@RogUE No, because the script is testing the result of the
find
command (whether 0x2
or 0x0
is present in the registry key).– TripeHound
Dec 2 '16 at 9:11
1
1
It doesn't appear to be a typo: it's checking for the presence of
0x0
; if it's found (find
returns 0
) then it jumps to turnon
and sets the value to 1
; if it's not found (find
returns 1
) then it jumps to turnoff
and sets it to 0
. Either it's an arbitrary choice (and the test could have been find 0x1
with the goto
s reversed) or it might be (I haven't checked) that 0x1
is present in the REQ QUERY
output in either case and so cannot be used to tell the two settings apart.– TripeHound
Dec 2 '16 at 12:10
It doesn't appear to be a typo: it's checking for the presence of
0x0
; if it's found (find
returns 0
) then it jumps to turnon
and sets the value to 1
; if it's not found (find
returns 1
) then it jumps to turnoff
and sets it to 0
. Either it's an arbitrary choice (and the test could have been find 0x1
with the goto
s reversed) or it might be (I haven't checked) that 0x1
is present in the REQ QUERY
output in either case and so cannot be used to tell the two settings apart.– TripeHound
Dec 2 '16 at 12:10
2
2
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
@RogUE Have you tried running the scripts?
– Steven
Dec 2 '16 at 15:55
|
show 2 more comments
The property to show/hide hidden files is managed in the registry, so you would simply need a .reg file that simply toggles this property. Here is how you do it through registry:
- Type “regedit“, then press “Enter“.
- Navigate to the following location: HKEY_CURRENT_USER --> Software --> Microsoft --> Windows --> CurrentVersion --> Explorer --> Advanced
- Set the value for “Hidden” to “1” to show hidden files, folders, and drives.
- Set the value to “2” to not show hidden files, folders, and drives.
- Set the value for “ShowSuperHidden” to “1” to show protected operating system files. Set the value to “2” to not show protected operating system files.
If you give me a bit of time, I will write the REG file and post it here.
Edit: Steven seems to have posted an example script, so I won't build one.
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
add a comment |
The property to show/hide hidden files is managed in the registry, so you would simply need a .reg file that simply toggles this property. Here is how you do it through registry:
- Type “regedit“, then press “Enter“.
- Navigate to the following location: HKEY_CURRENT_USER --> Software --> Microsoft --> Windows --> CurrentVersion --> Explorer --> Advanced
- Set the value for “Hidden” to “1” to show hidden files, folders, and drives.
- Set the value to “2” to not show hidden files, folders, and drives.
- Set the value for “ShowSuperHidden” to “1” to show protected operating system files. Set the value to “2” to not show protected operating system files.
If you give me a bit of time, I will write the REG file and post it here.
Edit: Steven seems to have posted an example script, so I won't build one.
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
add a comment |
The property to show/hide hidden files is managed in the registry, so you would simply need a .reg file that simply toggles this property. Here is how you do it through registry:
- Type “regedit“, then press “Enter“.
- Navigate to the following location: HKEY_CURRENT_USER --> Software --> Microsoft --> Windows --> CurrentVersion --> Explorer --> Advanced
- Set the value for “Hidden” to “1” to show hidden files, folders, and drives.
- Set the value to “2” to not show hidden files, folders, and drives.
- Set the value for “ShowSuperHidden” to “1” to show protected operating system files. Set the value to “2” to not show protected operating system files.
If you give me a bit of time, I will write the REG file and post it here.
Edit: Steven seems to have posted an example script, so I won't build one.
The property to show/hide hidden files is managed in the registry, so you would simply need a .reg file that simply toggles this property. Here is how you do it through registry:
- Type “regedit“, then press “Enter“.
- Navigate to the following location: HKEY_CURRENT_USER --> Software --> Microsoft --> Windows --> CurrentVersion --> Explorer --> Advanced
- Set the value for “Hidden” to “1” to show hidden files, folders, and drives.
- Set the value to “2” to not show hidden files, folders, and drives.
- Set the value for “ShowSuperHidden” to “1” to show protected operating system files. Set the value to “2” to not show protected operating system files.
If you give me a bit of time, I will write the REG file and post it here.
Edit: Steven seems to have posted an example script, so I won't build one.
edited Dec 1 '16 at 16:18
answered Dec 1 '16 at 15:25
IronWilliamCashIronWilliamCash
1,24459
1,24459
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
add a comment |
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE : Yes, the ShowSuperHidden is for the system files that are hidden.
– IronWilliamCash
Dec 1 '16 at 16:16
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
@RogUE I am unsure what the SuperHidden value does. However, it does always reset to zero whenever the View tab of the Folder Options applet is opened the first time.
– Steven
Dec 1 '16 at 16:47
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
Check the setting. Close Folder Options. Run my toggle script. Repeat.
– Steven
Dec 1 '16 at 17:03
add a comment |
Although not a command line function, here's a method on how to quickly open the window: Show hidden files and folders.
Caution: Review source information in Part 1 concerning Vista before proceeding.
Part 1: Create a folder that contains the object 'Show hidden files and folders'.
Part 2: Create a desktop shortcut of 'Show hidden files and folders'.
Part 3: Open the window for 'Show hidden files and folder'
After you have completed all 3 parts you will have a keyboard shortcut for quick access to the window for 'Show hidden files and folders'.
Part 1
- Right click a blank area of the desktop
- Click New
- Click Folder
- Name the folder: How-To Geek.{ED7BA470-8E54-465E-825C-99712043E01C}
Source: http://www.howtogeek.com/howto/8711/stupid-geek-tricks-enable-the-secret-how-to-geek-mode-in-windows/
Part 2:
- Open the How-To Geek folder you just created
- Click the arrow next to File Explorer Options if it's not already expanded
- Right click and drag to the desktop 'Show hidden files and folders'
- Click create shortcut here
Note: In this particular situation you could left click and drag, but it's always good practice to right click and drag to ensure you are performing the intended function, and because you can also click cancel if needed.
Part 3:
- Right click the shortcut folder on the desktop 'Show hidden files and folders'
- Click Properties
- On the Shortcut tab click in the Shortcut Key field
- Press something like Ctrl + Alt + T
- Click OK
- Press Ctrl + Alt + T and the 'Show hidden files and folders' will open
add a comment |
Although not a command line function, here's a method on how to quickly open the window: Show hidden files and folders.
Caution: Review source information in Part 1 concerning Vista before proceeding.
Part 1: Create a folder that contains the object 'Show hidden files and folders'.
Part 2: Create a desktop shortcut of 'Show hidden files and folders'.
Part 3: Open the window for 'Show hidden files and folder'
After you have completed all 3 parts you will have a keyboard shortcut for quick access to the window for 'Show hidden files and folders'.
Part 1
- Right click a blank area of the desktop
- Click New
- Click Folder
- Name the folder: How-To Geek.{ED7BA470-8E54-465E-825C-99712043E01C}
Source: http://www.howtogeek.com/howto/8711/stupid-geek-tricks-enable-the-secret-how-to-geek-mode-in-windows/
Part 2:
- Open the How-To Geek folder you just created
- Click the arrow next to File Explorer Options if it's not already expanded
- Right click and drag to the desktop 'Show hidden files and folders'
- Click create shortcut here
Note: In this particular situation you could left click and drag, but it's always good practice to right click and drag to ensure you are performing the intended function, and because you can also click cancel if needed.
Part 3:
- Right click the shortcut folder on the desktop 'Show hidden files and folders'
- Click Properties
- On the Shortcut tab click in the Shortcut Key field
- Press something like Ctrl + Alt + T
- Click OK
- Press Ctrl + Alt + T and the 'Show hidden files and folders' will open
add a comment |
Although not a command line function, here's a method on how to quickly open the window: Show hidden files and folders.
Caution: Review source information in Part 1 concerning Vista before proceeding.
Part 1: Create a folder that contains the object 'Show hidden files and folders'.
Part 2: Create a desktop shortcut of 'Show hidden files and folders'.
Part 3: Open the window for 'Show hidden files and folder'
After you have completed all 3 parts you will have a keyboard shortcut for quick access to the window for 'Show hidden files and folders'.
Part 1
- Right click a blank area of the desktop
- Click New
- Click Folder
- Name the folder: How-To Geek.{ED7BA470-8E54-465E-825C-99712043E01C}
Source: http://www.howtogeek.com/howto/8711/stupid-geek-tricks-enable-the-secret-how-to-geek-mode-in-windows/
Part 2:
- Open the How-To Geek folder you just created
- Click the arrow next to File Explorer Options if it's not already expanded
- Right click and drag to the desktop 'Show hidden files and folders'
- Click create shortcut here
Note: In this particular situation you could left click and drag, but it's always good practice to right click and drag to ensure you are performing the intended function, and because you can also click cancel if needed.
Part 3:
- Right click the shortcut folder on the desktop 'Show hidden files and folders'
- Click Properties
- On the Shortcut tab click in the Shortcut Key field
- Press something like Ctrl + Alt + T
- Click OK
- Press Ctrl + Alt + T and the 'Show hidden files and folders' will open
Although not a command line function, here's a method on how to quickly open the window: Show hidden files and folders.
Caution: Review source information in Part 1 concerning Vista before proceeding.
Part 1: Create a folder that contains the object 'Show hidden files and folders'.
Part 2: Create a desktop shortcut of 'Show hidden files and folders'.
Part 3: Open the window for 'Show hidden files and folder'
After you have completed all 3 parts you will have a keyboard shortcut for quick access to the window for 'Show hidden files and folders'.
Part 1
- Right click a blank area of the desktop
- Click New
- Click Folder
- Name the folder: How-To Geek.{ED7BA470-8E54-465E-825C-99712043E01C}
Source: http://www.howtogeek.com/howto/8711/stupid-geek-tricks-enable-the-secret-how-to-geek-mode-in-windows/
Part 2:
- Open the How-To Geek folder you just created
- Click the arrow next to File Explorer Options if it's not already expanded
- Right click and drag to the desktop 'Show hidden files and folders'
- Click create shortcut here
Note: In this particular situation you could left click and drag, but it's always good practice to right click and drag to ensure you are performing the intended function, and because you can also click cancel if needed.
Part 3:
- Right click the shortcut folder on the desktop 'Show hidden files and folders'
- Click Properties
- On the Shortcut tab click in the Shortcut Key field
- Press something like Ctrl + Alt + T
- Click OK
- Press Ctrl + Alt + T and the 'Show hidden files and folders' will open
edited Dec 24 '16 at 14:55
answered Dec 23 '16 at 12:47
DavemanthanDavemanthan
112
112
add a comment |
add a comment |
I know you arent using it but its worth considering the upgrade.
The process in Windows 10 is:
Alt + V
H
H
You need more keystrokes to open the command prompt in Windows 7.
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
add a comment |
I know you arent using it but its worth considering the upgrade.
The process in Windows 10 is:
Alt + V
H
H
You need more keystrokes to open the command prompt in Windows 7.
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
add a comment |
I know you arent using it but its worth considering the upgrade.
The process in Windows 10 is:
Alt + V
H
H
You need more keystrokes to open the command prompt in Windows 7.
I know you arent using it but its worth considering the upgrade.
The process in Windows 10 is:
Alt + V
H
H
You need more keystrokes to open the command prompt in Windows 7.
answered Dec 6 '16 at 21:20
Neil BurgeNeil Burge
11
11
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
add a comment |
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
I am not going to upgrade just for the sake of a keyboard shortcut.
– RogUE
Dec 11 '16 at 15:06
add a comment |
A possibly more convenient way to accomplish this with minimal effort is through adding a context menu item, to do this:
- Create a new simple text document somewhere and name it "togglehidden.reg"
Open it with notepad and paste the following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
[HKEY_CLASSES_ROOTDirectoryBackgroundshellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
save and close.
- double click your new reg file, accept prompts to install it and you're done.
This is what you should get:
Hidden Toggle
Source: https://winaero.com/blog/hidden-items-context-menu-windows-10/
add a comment |
A possibly more convenient way to accomplish this with minimal effort is through adding a context menu item, to do this:
- Create a new simple text document somewhere and name it "togglehidden.reg"
Open it with notepad and paste the following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
[HKEY_CLASSES_ROOTDirectoryBackgroundshellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
save and close.
- double click your new reg file, accept prompts to install it and you're done.
This is what you should get:
Hidden Toggle
Source: https://winaero.com/blog/hidden-items-context-menu-windows-10/
add a comment |
A possibly more convenient way to accomplish this with minimal effort is through adding a context menu item, to do this:
- Create a new simple text document somewhere and name it "togglehidden.reg"
Open it with notepad and paste the following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
[HKEY_CLASSES_ROOTDirectoryBackgroundshellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
save and close.
- double click your new reg file, accept prompts to install it and you're done.
This is what you should get:
Hidden Toggle
Source: https://winaero.com/blog/hidden-items-context-menu-windows-10/
A possibly more convenient way to accomplish this with minimal effort is through adding a context menu item, to do this:
- Create a new simple text document somewhere and name it "togglehidden.reg"
Open it with notepad and paste the following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
[HKEY_CLASSES_ROOTDirectoryBackgroundshellWindows.ShowHiddenFiles]
"CommandStateSync"=""
"Description"="@shell32.dll,-37573"
"ExplorerCommandHandler"="{f7300245-1f4b-41ba-8948-6fd392064494}"
"MUIVerb"="@shell32.dll,-37572"
save and close.
- double click your new reg file, accept prompts to install it and you're done.
This is what you should get:
Hidden Toggle
Source: https://winaero.com/blog/hidden-items-context-menu-windows-10/
answered Jan 9 '18 at 12:56
MetalOathMetalOath
1
1
add a comment |
add a comment |
Thanks to Steven's reply, I could wrote software that toggles this (and refresh open explorer windows) with a single click: Link
Edit:
When the application is opened, it gets a value from the registry key (Hidden) here: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced.
Depending on the value, a hidden command prompt to change the value is executed. Thereafter every open windows explorer window is refreshed and hidden files/folders is hidden/shown.
It is available for vieweing in the source.
add a comment |
Thanks to Steven's reply, I could wrote software that toggles this (and refresh open explorer windows) with a single click: Link
Edit:
When the application is opened, it gets a value from the registry key (Hidden) here: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced.
Depending on the value, a hidden command prompt to change the value is executed. Thereafter every open windows explorer window is refreshed and hidden files/folders is hidden/shown.
It is available for vieweing in the source.
add a comment |
Thanks to Steven's reply, I could wrote software that toggles this (and refresh open explorer windows) with a single click: Link
Edit:
When the application is opened, it gets a value from the registry key (Hidden) here: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced.
Depending on the value, a hidden command prompt to change the value is executed. Thereafter every open windows explorer window is refreshed and hidden files/folders is hidden/shown.
It is available for vieweing in the source.
Thanks to Steven's reply, I could wrote software that toggles this (and refresh open explorer windows) with a single click: Link
Edit:
When the application is opened, it gets a value from the registry key (Hidden) here: HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced.
Depending on the value, a hidden command prompt to change the value is executed. Thereafter every open windows explorer window is refreshed and hidden files/folders is hidden/shown.
It is available for vieweing in the source.
edited Jan 31 at 11:54
answered Jan 30 at 9:05
Ian NIan N
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1151844%2fhow-to-toggle-show-hide-hidden-files-in-windows-through-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown