Solved How to make a folder hidden and unsearchable?

Jeune Padawan

Banned
Local time
8:16 AM
Messages
2
Hey! I had an external hard drive on which I had an hidden and unsearchable folder on it. Everything was working well. I was using 1 bat file to hide it, and one bat file to show it. However, a few days ago, I dropped it on the ground and it's dead(the head is literally destroyed :cry:). Now that I'm trying to make another folder hidden and unsearchable on another external hard drive, it's not working! Here is what my bat files do:

hide.bat

Code:
@echo off
cd G:\Fichier\Test\config\fonts
attrib +s +h "Test Files" \*.* /S /D
attrib +s +h "Test Files"
EXIT

show.bat
Code:
@echo off
cd G:\Fichier\Test\config\fonts
attrib -s -h "Test Files" \*.* /S /D
attrib -s -h "Test Files"
EXIT

My folder "Test Files" is located at "G:\Fichier\Test\config\fonts\Test Files".

When I run the bat file, it hides it and everything but when I try to search for something, it still shows up! It shows up all of the files inside the folder I had just hidden. I went in the folder options and disabled the option to show hidden files and it still shows everything inside. From what I remember, last time I had it checked to "Show hidden files" on my other drive and I still couldn't see it or search for what was inside of it!

Thank you very much for any help! I appreciate it :)
 

My Computer My Computer

At a glance

Windows 7 Professional 64 bit
Computer type
PC/Desktop
OS
Windows 7 Professional 64 bit
Hey Jeune,
When I run the bat file, it hides it and everything
The second attrib command is hiding the folder, but because the first attrib command in each of your batch files are suffering from incorrect parameter format, Hide/Show .bat is not hiding/'showing' everything inside the folder which is why you are able to search the items inside it.

Below is my fix for Hide.bat:
Code:
@echo off
cd /D G:\Fichier\Test\config\fonts
attrib +S +H +I "Test Files\*" /S /D
attrib +S +H +I "Test Files"
EXIT
You should changes to Show.bat accordingly.
 

My Computer My Computer

At a glance

Windows 10, Windows 8.1 Pro, Windows 7 Profes...
Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
I LOVE YOU I LOVE YOU I LOVE YOU I LOVE YOU!!!!!!!!!!

Thank you so much! I had read tons of thread and yet had never found that answer! I am very much grateful! Plus, I don't even see the file with the option "Show hidden files" checked!

Thanks!!
 

My Computer My Computer

At a glance

Windows 7 Professional 64 bit
Computer type
PC/Desktop
OS
Windows 7 Professional 64 bit
Glad you've found what you're looking for, Jeune.

Remember to mark the thread as solved.

And Welcome to SevenForums.
 

My Computer My Computer

At a glance

Windows 10, Windows 8.1 Pro, Windows 7 Profes...
Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Back
Top