Windows server 2003/2008 and Vista – How to take ownership of files and folders via command line
Posted by Erica | Posted in Windows 2003, Windows Vista | Posted on 30-06-2009
1
Do you know that Windows server 2003 and Windows Vista include command line tool called “takeown” that lets you take ownership of files and folders?
Takeown tool basic syntax is:
takeown /f <file or folder name>
For example to take ownership of file secret.doc which resides in C:\Docs\ open command line and type:
takeown /f C:\Docs\secret.doc

Thus, if you want to take ownership of a folder named C:\Docs, as well as any files and folders inside C:\Docs, you`ll type:
takeown /f C:\Docs /r

One more tip… if you want to avoid Windows asking you questions like “Do you really want to do that?”… add one more key:
takeown /f C:\Docs /r /d y

Follow us on Twitter !








Would be useful if this command is available in Windows 7.This process is quite faster than taking ownership through properties dialog box