Windows

Pop Quiz: Windows command line file and folder tools

Do you know the difference between the ftype and assoc commands? Test your knowledge of working with files and folders from the Windows command line.

For many end users, the Windows Explorer GUI is the only mechanism they'll use to manipulate files and folders. But, IT pros often find times when they need to copy files, delete folders, or change file type associations from the command line. So, I've put together this short quiz to test your knowledge of working with files an folder from the Windows 7 command prompt.

Note: Unfortunately, our poll tool, which I use to create each pop quiz, doesn't let me indicate a correct answer after each question. To keep from giving away the answers before everyone has a chance to test his/her knowledge, and ruining all the fun, I've published the answers on the second page of this blog post. I encourage everyone to answer all the questions before looking at the second page or using your favorite search engine to find the answers.

Answers are on the next page.

About

Bill Detwiler is Managing Editor of TechRepublic and Tech Pro Research and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop supp...

19 comments
crcgraphix
crcgraphix

I remember working in RedRealm files on the Linux Red Hat and Debian X-Core Systems ... but I don't remember ever seeing these commands after that. In the Cyg Bash I've seen all of these commands if you start fro scratch. And, you configure the bash shell properly..>

ehula
ehula

takeown /f data.txt 'takeown' is not recognized as an internal or external command, operable program or batch file what did I do wrong?

Michael Jay
Michael Jay

but I think I got them all, except takeown, I usually use the GUI for all these.

Who Am I Really
Who Am I Really

[b]CD[/b] = Change Directory [b]MD[/b] = Make Directory [b]RD[/b] = Remove Directory and it's not: [b]CF MF RF[/b] - Change Folder - Make Folder - Remove Folder and in the details mode in windows exploder the default column width for [b]Type[/b] is only wide enough to display [b]File F...[/b] so we have people calling Directories Files "it's in my file" um, no "it's in yer Directory" .

NickNielsen
NickNielsen

It's obviously not one of the native commands to either DOS or the Windows command executive...

Sawyer7271
Sawyer7271

Takeown is a resource kit tool... you'll need to download it.

SteveTheBee
SteveTheBee

I'm running Windows XP Pro and I don't have takeown :-(

Spitfire_Sysop
Spitfire_Sysop

from question #9. It is simple enough to choose the valid answer but it's still a typo.

polingj
polingj

Won't "MD \files" create a sub-folder under the current drive, which *might* be C: ?

NickNielsen
NickNielsen

But MD has been around since before MS-DOS 1.0.

seanferd
seanferd

I believe subinacl can accomplish the same ends, though.

pgit
pgit

Hadn't seen that one before myself. Can't see where I'd have much use for it, either. After all, it's been almost 20 years I've lived without it. attrib has been enough for me, in that ultra-rare event admin doesn't have control of a file. I'm surprised a 'new' command would be so lengthy, I would suggest they rename the command "p0wn." :)

MCC Tech
MCC Tech

In the W7 cmd line, new to me too. ------------------ C:\Users\user>takeown/? TAKEOWN [/S system [/U username [/P [password]]]] /F filename [/A] [/R [/D prompt]] Description: This tool allows an administrator to recover access to a file that was denied by re-assigning file ownership.

Bill Detwiler
Bill Detwiler

I've check two Windows 7 machines and both have the takeown command. I haven't been able to find a specific Microsoft reference on which versions of Windows have takeown, but I would guess that Windows XP didn't include it and Vista and 7 do.

Bill Detwiler
Bill Detwiler

Windows XP doesn't come with the takeown tool, but Windows Vista, Windows 7, and Windows Server 2008 do.

willcomp
willcomp

Proper syntax for creating folder in root of c: if prompt is not in c: is md c:\files. Takes care of all eventualities.

oldbaritone
oldbaritone

there are a couple of things you just *can't* do unless you are the owner, even though you are an administrator. You must use takeown or the Security properties tab, and forcibly grab ownership of the file. Until you do, you're just wasting your time. I wasted 6 hours learning about this...

jesfer
jesfer

viable command in my win 7 also