How to make a folder hidden and unsearchable?


  1. Posts : 2
    Windows 7 Professional 64 bit
       #1

    How to make a folder hidden and unsearchable?


    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 ). 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


  2. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #2

    Hey Jeune,
    Jeune Padawan said:
    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


  3. Posts : 2
    Windows 7 Professional 64 bit
    Thread Starter
       #3

    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


  4. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #4

    Glad you've found what you're looking for, Jeune.

    Remember to mark the thread as solved.

    And Welcome to SevenForums.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:41.
Find Us