Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just replaced my old (Windows XP) computer by a new one (Windows 7). Thus, I am working with a new user. How can I change the file ownership of my files on my various external HDDs to the new user? I'd like to change only the files that belonged to a certain old user.

share|improve this question

3 Answers 3

Check out CACLS - it's built into Windows 7.

"CACLS is a Windows NT command-line utility that is used to display or modify file or directory access control lists (ACLs)."

  1. http://technet.microsoft.com/en-us/library/bb490872.aspx
  2. http://www.techrepublic.com/article/use-caclsexe-to-view-and-manage-windows-acls/1050976
  3. http://support.microsoft.com/kb/162786
share|improve this answer

A quick but inelegant way to find who owns files is to enter the following at a command prompt: dir c: /q /s > FilesOwner.txt Assuming c: is the drive you are working on.

The /q will add the owner to the directory listing

Most files will get updated after you change the containing folder, but you can find any odd files by piping the results to the find command: dir c: /q /s|find "myusername"

share|improve this answer
    
+1: Excellent way to find his files for sure. I forgot about dir /q. Too long in GUI. ;) –  Ƭᴇcʜιᴇ007 Mar 4 '11 at 1:56

In Windows 7 there is also the program takeown for this purpose. For example:

takeown /F . /R

changes the ownership of the current directory and its subdirs to the current user.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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