Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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)."

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .