It is currently Thu Mar 28, 2024 7:32 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Please, keep discussions on topic and in the right forum. The start menu topics go into the Classic Start Menu forum, etc. This makes it easier for people to locate topics they are looking for.
If you get a satisfactory response to your question, please mark the topic as "solved". Click the green √ button in the bottom-right of the post.



Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Nov 18, 2013 1:36 pm 
Offline

Joined: Mon Nov 18, 2013 1:32 pm
Posts: 2
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?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 18, 2013 6:32 pm 
Offline
User avatar

Joined: Sun Jan 06, 2013 1:44 pm
Posts: 1996
http://www.askvg.com/create-simple-scri ... sta-and-7/

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


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 19, 2013 1:52 am 
Offline

Joined: Mon Nov 18, 2013 1:32 pm
Posts: 2
Thanks,
it works perfectly

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


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 19, 2013 9:19 am 
Offline
User avatar

Joined: Sun Jan 06, 2013 1:44 pm
Posts: 1996
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 08, 2014 3:58 pm 
Offline
User avatar

Joined: Thu Apr 03, 2014 12:31 pm
Posts: 122
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"?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 08, 2014 9:57 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 08, 2014 11:11 pm 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
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 1538 times

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.
Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 18, 2014 9:04 am 
Offline

Joined: Fri Jul 11, 2014 11:15 am
Posts: 2
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}")


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 08, 2016 3:31 am 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
Classic Shell 4.3.0 now has built-in Explorer toolbar buttons for this.

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.