What added Hidden and System attribute to a folder?

2

0

Before upgrading to Windows 8 I did several backups to a secondary drive and specifically to this folder: E:\Backups\Keepers\2013.02.14 Before Windows 8. The backup folder included Acronis True Image Home 2010 backups and a number of xcopy's.

When I installed Windows 8 I wiped the two partitions on my SSD drive in favour of one partition for Windows 8 and proceeded with installation without a problem. As expected the secondary drive changed from E: to D: because the SSD drive now has one, not two, partitions.

Today when I went to restore files I could not see the D:\Backups\Keepers\2013.02.14 Before Windows 8 folder. Heart sunk! After investigation I found the 2013.02.14 Before Windows 8 folder had System and Hidden attributes. I did not set those attributes.

This leads me to the following questions:

  1. What might have turned on System & Hidden attribute?
  2. When I removed the attributes from 2013.02.14 Before Windows 8 folder one of two sub folders had the same issue. Why?
  3. I found the folder had these attributes by dir .tib /s. Why did dir find show these files given they were is hidden & system folders?

Tim Murphy

Posted 2013-02-15T05:03:33.080

Reputation: 233

Maybe I'm missing something, what's wrong with a folder having System & Hidden switched on? – Toby Allen – 2015-10-18T16:29:31.323

@TobyAllen they were turned on without my knowledge. – Tim Murphy – 2015-10-18T23:28:29.453

For me dir does not show hidden files by default, yet it shows everything with dir /a as it's supposed to do. – Alexey Ivanov – 2013-02-28T19:18:59.070

I saw Hidden attribute added to folders and files that start with . if a network folder accessed from Windows where the host is a Linux system. On Linux files that start with . are considered hidden, therefore hidden attribute is added when you view it from Windows. – Alexey Ivanov – 2013-02-28T19:21:10.943

Answers

1

I will tell you about propagation: When one folder is marked hidden, by default when using the gui the attribute will be propagated to files and subfolders. I cannot of course tell you why it happened. dir will show all files as harrymc said, but you can (as I do) tell windows explorer to show hidden and system files and folders, that's googlable.

Update for comments

Hiding and applying to subfolders is default behavior in Windows when using the gui, and possible using the /S option from the command line:

C:\Users\me>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I]
       [drive:][path][filename] [/S [/D] [/L]]

  +   Sets an attribute.
  -   Clears an attribute.
  R   Read-only file attribute.
  A   Archive file attribute.
  S   System file attribute.
  H   Hidden file attribute.
  I   Not content indexed file attribute.
  [drive:][path][filename]
      Specifies a file or files for attrib to process.
  /S  Processes matching files in the current folder
      and all subfolders.
  /D  Processes folders as well.
  /L  Work on the attributes of the Symbolic Link versus
      the target of the Symbolic Link

enter image description here

MDMoore313

Posted 2013-02-15T05:03:33.080

Reputation: 4 874

Inheritance doesn't explain why one folder had hidden & system attributes and not the other. – Tim Murphy – 2013-02-27T03:49:26.910

Also "when I removed the attributes (...)" should remove them also from subfolders, should it not? – Kitet – 2013-02-28T17:09:23.103

No, folder attributes, such as Hidden and System, are not inherited. Access Control Lists (ACLs) which are defined on Security tab of the Properties dialog are inherited if a permission is not set as applied to the current folder only. – Alexey Ivanov – 2013-02-28T19:13:06.890

@Kitet you have the option of applying the operation to files and subfolders. – MDMoore313 – 2013-02-28T20:17:26.817

@TimMurphy it all depends on how the perms were set in the first place, since we don't know it's hard to speculate. Was one of the two subfolders an OS or system folder already? – MDMoore313 – 2013-02-28T20:19:32.407

@AlexeyIvanov I probably should have said propagated, I will update. – MDMoore313 – 2013-02-28T20:38:20.803

@AlexeyIvanov Ok, that's right. There's just an option. – Kitet – 2013-02-28T20:52:13.103

0

First, the dir command is an ancient left-over from MS-DOS. It is supposed to show all files by design, since in these days Microsoft was not very much concerned with unaware consumers as clients.

The best explanation I can find for these file-attribute changes is that these files were created by an account that was badly translated to Windows 8, so they ended up with funny attributes. Only well-known accounts, for example the real Administrator or Everyone, are (usually) guaranteed to be perfectly conserved after a Windows version upgrade.

In any case, a real explanation of what happened will require knowledge of the Windows 8 upgrade program and its bugs, and no Microsoft developer will ever give you a straight answer about bugs in this forum (or any forum).

harrymc

Posted 2013-02-15T05:03:33.080

Reputation: 306 093

I did a fresh install. – Tim Murphy – 2013-02-27T03:47:38.267

The partition was created by the previous installation, so the explanation is that the new installation might not know the account which originally created these folders/files. – harrymc – 2013-02-27T08:51:19.367

1

@harrymc he's asking about ATTRIBUTES, you are talking about ACLs. Situation in which owner or original machine administrator account is not known, results in you not being able access a folder, not it being hidden. Must be some bug in NTFS driver, I also installed Win8 and still had Win7 drive in my laptop, which resulted in checkidisk running with every restart. See my fight with moving to Win8. No answer there either.

– Kitet – 2013-02-28T17:20:06.477

Windows 8 comes with a new NTFS format, so of course anything is possible in case of incompatibility between the old and new drivers. But permissions can cause files and directories to become unviewable, as in Access-based Enumeration. In my opinion, loused-up permissions can have rather unpredictable effects when badly interpreted by Windows utilities. – harrymc – 2013-02-28T19:41:56.850

0

simply some viruses done that, I have many similar issue in my customers PC and flash drives, they asked for recovery because they think their files are gone!!!

simply open an command prompt with administration privilege, go to root of your driver letter that in your case is D:

D:\attrib -R -S -H *.* /S /D

all done!

Kaveh

Posted 2013-02-15T05:03:33.080

Reputation: 689

0

I know this is very old but check this:

https://serverfault.com/questions/55668/why-does-robocopy-create-a-hidden-system-folder

In short, "it has to do with copying the hidden/system System Volume Information from the root of a disk – if it gets copied, the target directory gets the same attributes system/hidden. Creating the directory before copying does not help as robocopy will hide it too. Add the /A-:SH switch to ignore system files" to the robocopy command.

More information in this Microsoft Technet discussion, which clarifies that the switch is not the somewhat more intuitive /A:-SH.

Lazaros Filippidis

Posted 2013-02-15T05:03:33.080

Reputation: 1

1Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question. The question has nothing to do with robocopy. – DavidPostill – 2015-10-18T17:45:55.470