What is the extension of a folder in Windows?

There is no defined extension to a directory in Windows; rather, the type ("file" versus "directory") is kept in the master file table.

You should be able to see all files' extensions by just deselecting the "Hide extensions of known file types" in the folder options settings, or you can type command dir from the command line to see the files with extensions and you would see that the folder names do not have any extra extensions.


As others have said, Windows doesn't use filename extensions to identify folders. Folders, also called directories, are actually files but they have a FileAttribute value that identifies them as folders rather than regular files.

At a command prompt, you can type:

c:\temp> dir /a:d

which means, list all the files with the directory attribute, i.e., list of the folders in the current folder (c:\temp). Type dir /? for other options.

In Windows Explorer (for Windows Vista and Windows 7) you can specify a search filter of kind:folder to find the subfolders of the selected location.

There are other FileAttribute values, too; Archive, Compressed, Encrypted are some of the more common ones. You can use scripting and programming languages to examine these attributes. Here's a post on the Scripting Guys blog about using PowerShell to work with file attributes.

FWIW, although you can name a directory something like test.png, I think that's likely to create confusion. Windows won't care, but users might.


Folders are a different type object. They don't have to have a extension to identify them as folders.

The name can consist of any valid characters and that includes ".", so you can call a folder:

test.txt
test.png
etc.