The assoc in Windows command
The assoc command is used to display or modify the file name extension links. If used without parameters, the assoc command will display a list of all the links that extend the current file name.
Note: This command is only supported in CMD.EXE and not available from PowerShell.
For an example of how to use this command, see Example .
Syntax
assoc [[= []]]
Parameters
ParametersDescription Specifies the file name extension. Specify the file type to associate with the specified file name extension. /? Show help at the command prompt.Note
- To remove the file type link for the file name extension, add a space after the = sign by pressing the spacebar.
- To see the current file types that define the open command string, use the ftype command .
- To redirect the result of assoc command to a text file, use the redirect operator > .
For example
To see the current file type link for the .txt file name extension, enter:
.txt assoc
To remove the file type link for the .bak file name extension, enter:
assoc .bak =
Note : Remember to add a space after the = sign.
To see the results of assoc links for one screen at a time, enter:
assoc | more
To send the results of the assoc command to the assoc.txt file , enter:
assoc> assoc.txt
See more:
- 34 common shortcuts on Windows Command Prompt
- ARP and the working principle in LAN
- The commands run the application available in Windows
4 ★ | 2 Vote
You should read it
May be interested
- Instructions for using Command Promptdeep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
- Rd command in Windowsthe rd command helps delete a directory
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- How to use the command history function in Command Promptcommand prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
- The sfc command in Windows(applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
- Reg command copy in Windowsto copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
- Fc command in Windowsthe fc command compares two files or a collection of files and displays the differences between them.
- The echo command in Windowsthe echo command displays the message or turns on / off the command repeat feature. if used without parameters, the echo command will display the current echo setting.
- Xcopy command in Windowsthe xcopy command is a command prompt command used to copy one or more files or folders from one location to another. with many options and the ability to copy entire directories, the xcopy command is similar to, but much more powerful, than the copy command.
- The cacls command in Windowsthe cacls command displays or modifies an arbitrary access control list (dacl) on the specified file. the command applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012.