AutoHotkey Community

It is currently May 26th, 2012, 12:32 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Hide/Show hidden files
PostPosted: December 14th, 2008, 1:38 am 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2008, 2:10 am 
Offline

Joined: May 25th, 2007, 6:13 pm
Posts: 373
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

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

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2008, 2:19 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
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:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2008, 2:30 am 
Offline

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
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.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Morpheus, SKAN, Yahoo [Bot] and 13 guests


You can post new topics in this forum
You can 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:
Powered by phpBB® Forum Software © phpBB Group