Search code examples
windowscygwin

Why this occur about hidden files


I've found 2 hidden files on my drive D:/ , I found them by accident, because one day I opened a picture (1 picture exactly on my drive D:/), and by accident I push right navigation button on keyboard, and there is another picture WHICH familiar with me, and there is another, okay maybe this is not important but this is the name (1. AlbumArtSmall.jpg, 2. Folder.jpg), okay I think these 2 jpg files is hidden, but when I unhidden by the step : Tools > Folder Options > View > Show hidden files and folders, but It doesn't make sense (there is no such file on D:/), after that I check it again by command prompt, which is the step :

1. %drive% d:
2. D:> dir
3. there is no such file (those 2 jpg file)

But, when I check with cygwin terminal as I know this is for Linux OS (my OS is windows7 by the way :

1. /cygdrive/d
2. $ dir
3. there is such file (those 2 jpg file)

I know this is not a big problem, but I'm curious why this is happened? And if I want to delete these 2 files, I can do nothing, maybe there is a way to delete them by cygwin terminal command, but the problem for me not because I want to delete them, but more for why this is occur? Thanks in advance, sorry for my English.


Solution

  • They are probably hidden and system. You can display them in explorer by selecting, in addition to "show hidden files", the "show system files" option.
    On the command line, dir /a will show you hidden and system files, too. To delete them from the command line, type attrib -h -s -r *.jpg to remove hidden, system, and readonly attributes from all jpg files (for example). Then just normal del file.jpg.