Classic Shell
http://www.classicshell.net/forum/

Custom button: show hidden files/folders
http://www.classicshell.net/forum/viewtopic.php?f=8&t=1742
Page 1 of 1

Author:  Digital-Joe [ Mon Nov 18, 2013 1:36 pm ]
Post subject:  Custom button: show hidden files/folders

Hi,

i want to make a custom button in the explorer bar that shows or hides hidden files and folders.
however this is not one of the standard functions, what should i input in the command section of the custom button to make this happen?

Author:  Jcee [ Mon Nov 18, 2013 6:32 pm ]
Post subject:  Re: Custom button: show hidden files/folders

http://www.askvg.com/create-simple-scri ... sta-and-7/

then set it in the command field for a custom button :P

Author:  Digital-Joe [ Tue Nov 19, 2013 1:52 am ]
Post subject:  Re: Custom button: show hidden files/folders  Topic is solved

Thanks,
it works perfectly

is there a way i could also make a button that actually toggles the hide property of the file?

Author:  Jcee [ Tue Nov 19, 2013 9:19 am ]
Post subject:  Re: Custom button: show hidden files/folders

This code is from the classic shell help document
Quote:

3) Copy selected files to the parent folder

Create a batch file called C:\CopyParent.bat:
set list=%1
set list=%list:"=%
for /F "delims=" %%i in (%list%) do copy /Y "%%i" ..
del %1


Use this command: C:\CopyParent.bat "%3". %3 will be replaced by a text file containing the full names of all selected files. The batch file will read each line of that text file, and copy each of the selected files to the parent folder. At the end the batch file deletes the initial temp file. The first two set commands remove the quotes from the %1 parameter.


This is a modification of the above script, Though I suspect you want a single button to toggle the hidden state (which I have been unable to figure out thusfar, and maybe someone else can help with formatting the IF statement)

this will hide the selected files
@echo on
set list=%1
set list=%list:"=%
for /F "delims=" %%i in (%list%) do attrib +H "%%i"
del %1



this will un-hide the selected files
@echo on
set list=%1
set list=%list:"=%
for /F "delims=" %%i in (%list%) do attrib -H "%%i"
del %1

Author:  Weboh [ Tue Jul 08, 2014 3:58 pm ]
Post subject:  Re: Custom button: show hidden files/folders

I like being able to do this, but this toggles the "show protected system files" property as well. Is there a way to do this without toggling that?

Also, is there a way to toggle the "Always show icons, never thumbnails"?

Author:  Ivo [ Tue Jul 08, 2014 9:57 pm ]
Post subject:  Re: Custom button: show hidden files/folders

Remove the lines from the script that contain the word "SHidden" and leave everything else. This will stop toggling the system files.

I don't know how to toggle the icon setting. You need to find what registry key (if any) controls that behavior. And even then it will depend on the implementation of Explorer whether the registry change will be respected.

Author:  Gaurav [ Tue Jul 08, 2014 11:11 pm ]
Post subject:  Re: Custom button: show hidden files/folders

To toggle "Always show icons, never thumbnails", the registry value is HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\IconsOnly.

Another way to toggle it is by using VBScript and adding it to the context menu. Download the attached ZIP and extract ToggleThumbs.vbs to your C:\Windows folder. Then double click to merge ToggleThumbs.reg into the Registry. You will get a context menu item called "Toggle thumbnails" when you right click the empty background of a folder.

Attachments:
ToggleThumbs.zip [876 Bytes]
Downloaded 246 times

Author:  Agent007 [ Mon Aug 18, 2014 9:04 am ]
Post subject:  Re: Custom button: show hidden files/folders

Hello.
The script for show hidden files from askvg.com works perfectly, but show all hidden files an folders, including the special system files (SHidden or "superHidden").
In the majority of cases, it is not necessary to show hidden system files.
I think we can distinguish two types of hidden files with two scripts. I tried it and it works:

Script for Hidden Files:
Hidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
SHidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
Set Sh = WScript.CreateObject("WScript.Shell")
St = Sh.RegRead(Hidden)
If St = 2 Then
Sh.RegWrite Hidden, 1, "REG_DWORD"
Else
Sh.RegWrite Hidden, 2, "REG_DWORD"
Sh.RegWrite SHidden, 0, "REG_DWORD"
End If
Sh.SendKeys("{F5}")


Script for SystemHidden Files:
Hidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
SHidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
Set Sh = WScript.CreateObject("WScript.Shell")
St = Sh.RegRead(SHidden)
If St = 0 Then
Sh.RegWrite SHidden, 1, "REG_DWORD"
Sh.RegWrite Hidden, 1, "REG_DWORD"
Else
Sh.RegWrite SHidden, 0, "REG_DWORD"
End If
Sh.SendKeys("{F5}")

Author:  Gaurav [ Mon Aug 08, 2016 3:31 am ]
Post subject:  Re: Custom button: show hidden files/folders

Classic Shell 4.3.0 now has built-in Explorer toolbar buttons for this.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/