 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Exnie Guest
|
Posted: Sun Dec 14, 2008 12:38 am Post subject: Hide/Show hidden files |
|
|
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
|
Posted: Sun Dec 14, 2008 1:10 am Post subject: |
|
|
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 |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
Posted: Sun Dec 14, 2008 1:19 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
tidbit
Joined: 09 Mar 2008 Posts: 1807 Location: Minnesota, USA
|
Posted: Sun Dec 14, 2008 1:30 am Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|