recursively changer owner windows 7

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

recursively changer owner windows 7

Message par Clippy »

Somehow I accidentally set all the files in a subfolder to "No Owner' and Je n'arrive pas à change all the permissions. I can change one by hand by changing the owner then setting permissions but how can I change owner of all the files in this directory at once?
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Re: recursively changer owner windows 7

Message par Clippy »

Use [`takeown`](http://technet.microsoft.com/en-us/library/cc753024.aspx) from the invite de commandes to take ownership a folder, all its subfolders and files recursively:

```
takeown /f "c:\folder\subfolder" /r

```

Cela fonctionne well, but si vous ne run your ligne de commande console en tant qu'administrateur it may fail for files you don't own.
Répondre

Revenir à « Windows 10 »