There are lots of books on how to uncover hidden potentials or the hidden secrets of the amazon or find that hidden info the CIA really doesn’t care for you to find.
Course this is not one of those functions this is simply a nerdy way to get a list of hidden files on any given drive or folder.
Have a look at this VB Script. And enjoy.
‘Description- Lists all files in a selected folder
‘and (optionally its subfolders
‘Uses Dir with various switchesOption Explicit
Dim sFldrInput1, sFldrInput2,introMsg, sSwitchesintroMsg = msgBox (“This program creates a list of all hidden files that are in” & vbCrLf & “a selected folder and its subfolders (if desired).” & vbCrLf & “If there are many files, it may take a few minutes.”& vbCrLf & “A message will appear when the list is finished.”,vbOKCancel)
If introMsg = vbCancel Then
Wscript.Quit
End If
ChooseFolder sFldrInput1,”Select the folder containing files to be listed”
ChooseFolder sFldrInput2, “Select the folder where list is to be put”
ChooseSubfldr sSwitches
MakeList sFldrInput1, sFldrInput2, sSwitches
Wscript.Quitsub ChooseFolder(sFldrChoice, sSelectionString)
dim objShell, objFolder, objFolderItem, strPath, msgValue
Const DESK_TOP = &H10&
Const WINDOW_HANDLE = 0
Const OPTIONS = 0
sFldrChoice = “”
Set objShell = CreateObject(“Shell.Application”)
Set objFolder = objShell.Namespace(DESK_TOP)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path
Set objShell = CreateObject(“Shell.Application”)
Set objFolder = objShell.BrowseForFolder _
(WINDOW_HANDLE, sSelectionString, OPTIONS, strPath)
If objFolder Is Nothing Then
Wscript.Quit
End IfSet objFolderItem = objFolder.Self
sFldrChoice = objFolderItem.PathmsgValue = msgBox(“You selected “& sFldrChoice, vbOKCancel)
If msgValue = vbCancel Then
Wscript.Quit
End If
If Len(sFldrChoice) = 3 then
chkForDrv sFldrChoice
End if
End subSub ChooseSubfldr(sSwitches)
dim sSubfldrYesNo
sSubfldrYesNo = msgBox(“Do you want to list files in all subfolders also?”, vbYesNoCancel)
Select Case sSubfldrYesNo
case vbCancel
Wscript.Quit
case vbNo
sSwitches = ” /A:H”
case vbYes
sSwitches = ” /A:H /s”
End selectEnd sub
Sub MakeList(sourceFldr, listFldr, sSwitches)
Const sdirCmd =”cmd /c dir “
Const sWildCard = “\*.*”
Const sRedirect =”>”
dim listFile
dim sStatement
dim objWshell
Dim oIE, oIEDoc, sMsg
listFile =”\list_of_hidden_files.txt”
sStatement = sdirCmd & chr(34) & sourceFldr & sWildcard & chr(34) & sSWitches & sRedirect & chr(34) & listFldr & listFile & chr(34)‘The next part is just to display a message while making list
set objWshell=Wscript.CreateObject(“Wscript.Shell”)
Set oIE = Wscript.CreateObject(“InternetExplorer.Application”)
oIE.Navigate “about:blank”
do while oIE.busy : wscript.sleep 10 : loop
Set oIEDoc = oIE.Document
oIE.AddressBar = False
oIE.StatusBar = False
oIE.ToolBar = False
oIE.height=200
oIE.width=300
oIE.Resizable = False
oIE.Visible = True
sMsg= “<p><center>List is being made.<br>Please wait.<br>Large numbers of files may take several minutes.</center></p>”
oIEDoc.Body.Innerhtml= sMsg
‘List the files
objWshell.Run sStatement,7,trueSet oIEDoc = Nothing
oIE.Quit
Set oIE = Nothing
set objWshell = Nothing
msgBox “List has been made of hidden files”
End subSub chkForDrv(sFldrChoice)
Dim oRe, bMatch
set oRe = New RegExp
oRe.pattern = “[a-zA-Z]:\\$”
bMatch= oRe.Test(sFldrChoice)
If bMatch Then sFldrChoice= Left(sFldrChoice, 2)
Set oRe = Nothing
End sub
If it blows up on you. make sure to blame apple, Linus Torvalds or your local microsofty. Just don’t blame me.
