How to hide a file in MS-DOS
You have two options to choose from in case you want to hide a file in MS-DOS:
Option 1:
Use the following attribute command: attrib +h c:\mydoc.txt
This command will hide the file ‘mydoc.txt’ positioned in the root of the C: drive making it invisible to another user of the computer. To make this file unhidden or viewable again you will have to use the same command line just instead of the ‘+’ sign you will use a ‘-’ sign (attrib -h c:\mydoc.txt).
Option 2:
Use of ASCII characters whenever renaming or creating a new directory. Here are the main steps to create a directory with ASCII characters:
md* + Alt + 987* (continue holding the Alt), then letting go of Alt you will get a solid block and you will have to press ENTER to create the directory. Now here is the path you should follow in case you want to access the hidden directory:
cd* + Alt + 987* then pressing ENTER.
It is important to know that hiding a directory this way, it won’t be accessible in Windows 3.1 and Windows 95 but Windows 98 and the newest Windows operating systems are capable detecting these folders.
* typed




