AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hide/Show hidden files

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Exnie
Guest





PostPosted: Sun Dec 14, 2008 12:38 am    Post subject: Hide/Show hidden files Reply with quote

Hi,

I like to use the hidden file feature to declutter my documents and to keep myself from accidentally deleting files that I need. Does anyyone know a way to use autohotkey to toggle on/off the hidden files feature so I don't have to go into settings and turn if on and off when I need to modify the hidden files?
Back to top
Dra_Gon



Joined: 25 May 2007
Posts: 373

PostPosted: Sun Dec 14, 2008 1:10 am    Post subject: Reply with quote

That would be:
Code:
FileSetAttrib, Attributes [, FilePattern, OperateOnFolders?, Recurse?]


The thing is,you'll have to specify WHICH files you want hidden, unless you want 'em all hidden. For instance:

Text {.txt}:
Code:
FileSetAttrib, +H, %A_MyDocuments%\*.txt, 0, 0

This will set ALL .txt files to hidden within your MyDocuments folder, but NOT in the folders below that.

Take a look in the Docs "FileSetAttrib" for more info.

Ciao,
Dra'Gon
_________________

For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/
Back to top
View user's profile Send private message Send e-mail
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Sun Dec 14, 2008 1:19 am    Post subject: Reply with quote

Use RegWrite to change setting:
Code:
;Show hidden files
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1


Code:
;Do not show hidden files
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Sun Dec 14, 2008 1:30 am    Post subject: Reply with quote

heres a script i found on the forum awhile ago, forgot who wrote it. all credit goes hit him/her.

Code:
;BETA ! ok,  works, but still...
#SingleInstance, Force

GroupAdd, RenameWindows, ahk_class CabinetWClass
GroupAdd, RenameWindows, ahk_class ExploreWClass
GroupAdd, RenameWindows, ahk_class Progman
GroupAdd, RenameWindows, ahk_class #32770
GroupAdd, RenameWindows, ahk_class WorkerW

#IfWinActive ahk_group RenameWindows
~^F2::GoSub,Toggle_HiddenFiles_Display
#IfWinActive

Toggle_HiddenFiles_Display:
  RootKey = HKEY_CURRENT_USER
  SubKey  = Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

  RegRead, HiddenFiles_Status, % RootKey, % SubKey, Hidden

  if HiddenFiles_Status = 2
      RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 1
  else
      RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 2

ControlGetFocus, OutputVar, A
if (OutputVar<>"SysListView321")
{
ControlGet, hwndlistview, HWND,, SysListView321, A
ControlFocus , ,  ahk_id %hwndlistview%
Sleep, 119
Send, {F5}
ControlFocus ,%OutputVar%
Return
}
   Sleep, 119
   Send, {F5}
   Send, {AppsKey}e
Return

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group