How to change Hidden Attribute of a file/folder in Windows OS

When a Virus modifies these attributes to the files/folders in a removable device (USB/SD Memory/HDD) in order to hidden them from the user.

The problem is solved using attrib -s -h /s /d command.

The effect of New Folder.exe virus : It just make all your directory as system director and also make it hidden. Then it creates exe file for each directory with directory icon. This is why when you open any folder, it opens in new window (if you are using Microsoft windows as operating system).

So, First deleted all those exe files and delete recycle directory as well. This should remove your folder.exe virus. But still you need remove the effect of virus. You need to update back the folder attributes.

Open Command Prompt Window and navigate to the required folder usind cd <foldername> command then you can do it by a single line command:

Method 1

attrib -s -h /s /d

Method 2

attrib FOLDERNAME -s -r -a -h /S /D

Hidden Attribute

It is an lternative to attrib FILENAME -h command

You can use the attrib command in order to change the attributes on a specified file, directory or directory with recursively changing the files inside the directory also, the command may look like:

Which will remove any attributes to a specified FOLDERNAME including the files/folders inside of it.


You can leave a response, or trackback from your own site.

Leave a Reply