1

I found this on a Windows XP machine and as well as a Windows 7 machine. That is certain files in C drive (not anywhere else yet), are hidden, though their hidden attribute is false (or unchecked). Those files look pale like other hidden files when made visible (from folder options) and they get hidden when we set "do not show hidden files" in folder options.

Those files in my machine as I see are autoexec.bat and config.sys in C:. Is there a way to identify such files, say from some script, registry or from programming environment? Basically I was trying to get the count of non-hidden files in a directory, and my application fails when it attempts to get count of files in C:. What happens is that the application counts those two files (since its attribute is not hidden), but from a visual standpoint, they are pale/hidden normally.


My point is not about System Files which requires a special setting in folder options to be shown. Such files and folders do have hidden attribute checked (though the checkbox in their case is readonly). They are in most ways similar to normal hidden files/folders. My question is about files that appear hidden but without hidden attribute. To see what is that, see your C drive for the files I mentioned if they happen to be there..

6
  • 3
    Are these perhaps system files? The attribute would be +S instead of +H. You can check from a command prompt window.
    – user3463
    Jul 30 '12 at 2:46
  • No they are not system files.. I will update my question
    – nawfal
    Jul 30 '12 at 3:07
  • Interesting, havn't notice this phenomenon before. I tried several tests, and found (1) AUTOEXEC.BAT or CONFIG.SYS must be named in UPPERcase, or they will not looks like hidden file. (2) AUTOEXEC.BAT or CONFIG.SYS must be placed in root directory of any drive. If they're not in root directory, then they're not looks like hidden file. I guess explorer.exe internally treat these special files as system files. Explorer++ does not treat these two file as hidden/system file because they do not have +H or +S attributes. Jul 30 '12 at 5:44
  • @LiuYan刘研 what is even more interesting is that when u select those two files, you see in the details panel that they do have hidden property. But if u see properties by pressing alt+enter, the hidden attribute is surprisingly not there!! And my code (C#.NET) detects them as not hidden in the end :X :)
    – nawfal
    Jul 30 '12 at 6:18
  • @LiuYan刘研 That UPPERcase thing is interesting. DO you have any idea why it is so?
    – nawfal
    Jul 30 '12 at 6:23
1

I did some research when I was writing my own usb_vaccine script. AFAIK, only three files will be displayed with fake Hidden and System attributes in Windows Explorer:

  • COMMAND.COM
  • autoexec.bat
  • config.sys

The hiding begins with Windows XP version of Windows Explorer.

Some people say their casing matters on whether they will be hidden, but I have no time to verify that (since Windows file systems are case-insensitive anyway).

However, I should point out, that this hiding behavior happens on both 32-bit and 64-bit versions of Windows Explorer. This means if you inserted an hard disk with a 32-bit Windows on a 64-bit Windows machine, you will see these 3 files hidden (fake Hidden and System attributes) without Hidden attributes set officially in filesystem.

1

They are hidden because they are operation system files although they are not hidden in the attribute. Just uncheck the line in the picture that i have highlighted. And you will be able to see the system files.

7
  • sorry for being rude, but this isn't what I am talking about. I updated my question
    – nawfal
    Jul 30 '12 at 3:01
  • There is no way to hide any file without checking hidden in attribute. Unless it is a system file
    – thuyein
    Jul 30 '12 at 3:03
  • Titan, you dont get it. I do agree there is no way for us, end users. But these are not files I or you created. These files come with operating system, or from some heavy weight third party application. Something programmatically must have created them. FYI, system files do have their hidden attribute checked, in a readonly manner. Please read my question..
    – nawfal
    Jul 30 '12 at 3:06
  • @nawfal I think this command will do it. "dir /as" type this in cmd, this command will show system files. /a switch is used to show attrib files where "s" stand for system file. And i don't have those files you mentioned above.
    – thuyein
    Jul 30 '12 at 3:18
  • Ok Titan, thanks for that much. Let me see and get back to you asap. Could you remove the pic, and texts that are not related to my problem. It makes no sense to be there..
    – nawfal
    Jul 30 '12 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.