179k views
2 votes
In command prompt, Whats a command that will list only .ini files in C:\Windows\System32 directory?

User Dorony
by
7.6k points

1 Answer

4 votes

There are two commands that need to be executed:

cd C:\Windows\System32

dir *.ini

Let's analyse them.

First we have the cd command aka change directory command. It's very simple.

cd {directory path}

Whenever you enter this command windows operating system will internally switch the path parameter of the working terminal to your desired path in this case windows system32 directory.

Then we have another command. The dir or directory command.

dir {directory path}

Directory command will list you all files and subdirectories in a certain directory.

{file name}.{file extension}

If we use * for file name you are telling your os that all you care is file extension so it will return you all files in a certain directory who possess the same file extension.

Hope this helps.

r3t40

User VRPF
by
6.8k points