Transcription of The Command Line in Windows - Didier Morandi
1 The Command line in Windows Vic Laurie All rights reserved, Copyright 2005-2010 The Windows Command line , Batch Files, and Scripting- Using the Command [1/15/2010 3:33:06 PM]Site navigationpowered by FreeFindPagesHomeAssoc and FtypeBatch files- basicsBatch files - branchingBatch files- iteratingCommand line -IntroductionCommand line list andreferenceCommands that everybodycan useConfiguring the commandprompt windowDoskeyFile system utility- FsutilNet ServicesNetstatNetwork Services ShellPowerShellRecovery ConsoleRecovery Console-CommandsRegistry editor consoleScripts in the commandlineServer 2003 tools for XPService ControllerCommand (SC)Shell commandStart-Run lineThe Windows Command line , Batch Files, and ScriptingThe Windows Command line is a mainstay for systems administrators and power usersbut is relatively unknown to many PC users.
2 The purpose of this site is to make thepower and utility of the Command line more familiar to a wider community of computerusers. Also under-appreciated are the related resources of batch files and scripts andthese will be discussed as is famous as a graphical user interface and many computer users tend to forget (or never knew) that there are alsovery useful Command line functions in Windows . In fact, there is a great deal more to Windows than just point and click. Thekeyboard and the Command line can be substantial adjuncts to the mouse and icons. There are two basic features involving acommand line . One is the entry 'Run" (or "Start Search" in Vista) that is in the Start menu and the other is the Command to the Command LineThose who are new to the Command line or need a refresher can read basic material on these pages: Command line - IntroductionCommand line list and referenceCommands that everybody can useConfiguring the Command prompt windowStart-Run lineSpecific Applications of the Command ShellSome details and examples for various commands are considered in a series of pages listed below.
3 The subjects includecomputer maintenance, system administration, file management, Internet tools, and network managementAssocFtypeXcopyNetwork and Internet toolsNet Services (Net)NetstatNetwork Services Shell (Netsh)TCP/IP networking toolsThe Windows Command line , Batch Files, and Scripting- Using the Command [1/15/2010 3:33:06 PM]Support toolsTasklistTCP/IP networking toolsTips for using thecommand shellTskill and TaskkillVariables and "Set"Vista Command listVista Command line tipsXcopyRelated linksComputer EducationSurf the Internet SafelyBlog with tipsWindows for BeginnersWindows RegistrySystem administration and maintenanceFile system utility- FsutilRecovery ConsoleRecovery Console- CommandsRegistry editor consoleService Controller Command (SC)TasklistTaskkillTskillXcopyAdditions and extensions to native commandsScripts in the Command lineServer 2003 tools for XPSupport toolsBatch filesBatch files provide a simple way to perform many repetitive or time-consuming tasks.
4 While batch files can be quitesophisticated, the basics are simple enough to be useful to the average PC user with no knowledge of to Batch filesBranching and Looping with "If: and "Goto"Iterating and Looping with " , "Variables and the "Set" commandOther Command line TopicsDoskeyPowerShellTips for using the Command shellVistaShell commandVista Command listVista Command line tips< Home | About the author | Contact me | Privacy policy | 2002-2010 Victor LaurieThe Windows Command line , Batch Files, and Scripting- Using the Command [1/15/2010 3:33:14 PM]Site navigationpowered by FreeFindPagesHomeAssoc and FtypeBatch files- basicsBatch files - branchingBatch files- iteratingCommand line -IntroductionCommand line list andreferenceCommands that everybodycan useConfiguring the commandprompt windowDoskeyFile system utility- FsutilNet ServicesNetstatNetwork Services ShellPowerShellRecovery ConsoleRecovery Console-CommandsRegistry editor consoleScripts in the commandlineServer 2003 tools for XPService ControllerCommand (SC)Shell commandStart-Run lineThe Windows Command line , Batch Files, and ScriptingThe Windows Command line is a mainstay for systems administrators and power usersbut is relatively unknown to many PC users.
5 The purpose of this site is to make thepower and utility of the Command line more familiar to a wider community of computerusers. Also under-appreciated are the related resources of batch files and scripts andthese will be discussed as is famous as a graphical user interface and many computer users tend to forget (or never knew) that there are alsovery useful Command line functions in Windows . In fact, there is a great deal more to Windows than just point and click. Thekeyboard and the Command line can be substantial adjuncts to the mouse and icons. There are two basic features involving acommand line . One is the entry 'Run" (or "Start Search" in Vista) that is in the Start menu and the other is the Command to the Command LineThose who are new to the Command line or need a refresher can read basic material on these pages: Command line - IntroductionCommand line list and referenceCommands that everybody can useConfiguring the Command prompt windowStart-Run lineSpecific Applications of the Command ShellSome details and examples for various commands are considered in a series of pages listed below.
6 The subjects includecomputer maintenance, system administration, file management, Internet tools, and network managementAssocFtypeXcopyNetwork and Internet toolsNet Services (Net)NetstatNetwork Services Shell (Netsh)TCP/IP networking toolsThe Windows Command line , Batch Files, and Scripting- Using the Command [1/15/2010 3:33:14 PM]Support toolsTasklistTCP/IP networking toolsTips for using thecommand shellTskill and TaskkillVariables and "Set"Vista Command listVista Command line tipsXcopyRelated linksComputer EducationSurf the Internet SafelyBlog with tipsWindows for BeginnersWindows RegistrySystem administration and maintenanceFile system utility- FsutilRecovery ConsoleRecovery Console- CommandsRegistry editor consoleService Controller Command (SC)TasklistTaskkillTskillXcopyAdditions and extensions to native commandsScripts in the Command lineServer 2003 tools for XPSupport toolsBatch filesBatch files provide a simple way to perform many repetitive or time-consuming tasks.
7 While batch files can be quitesophisticated, the basics are simple enough to be useful to the average PC user with no knowledge of to Batch filesBranching and Looping with "If: and "Goto"Iterating and Looping with " , "Variables and the "Set" commandOther Command line TopicsDoskeyPowerShellTips for using the Command shellVistaShell commandVista Command listVista Command line tips< Home | About the author | Contact me | Privacy policy | 2002-2010 Victor LaurieManaging Files from the Command line - Assoc and [1/15/2010 3:33:16 PM]Site navigationHomeAssoc and FtypeBatch files- basicsBatch files - branchingBatch files- iteratingCommand line -IntroductionCommand line list andreferenceCommands that everybodycan useConfiguring the commandprompt windowDoskeyFile system utility- FsutilNet ServicesNetstatNetwork Services ShellPowerShellRecovery ConsoleRecovery Console-CommandsRegistry editor consoleScripts in the commandlineServer 2003 tools for XPService ControllerCommand (SC)Shell commandStart-Run lineSupport toolsTasklistTCP/IP networking toolsTips for using thecommand shellTskill and TaskkillManaging Files from the Command line - Assoc and FtypeWindows comes with several Command - line tools for file management.
8 The features andapplications of Assoc and Ftype are discussing the file management tools, I would like to quickly review some of the basic facts about how Windowsmanages files. (More details can be found at another site.) A very basic property of a file is its file type. Each file type has a setof specific actions that can be carried out with it or to it. The software that is assigned to do these actions with or to a particularfile type is said to be "associated" with the file type. There may be several actions and different software may be involved foreach particular action. This set of software constitutes the program associations for a given file type. The extension of a file is atag that tells the computer what the file type is and what is to be done with the file when it is opened or double-clicked orotherwise invoked one way or the other.
9 Microsoft also uses the word "associate" in connection with file extensions and refers toan extension being associated with a particular file type. All of this information is stored in the Registry and can be edited orchanged in several ways. I have discussed methods that use the graphical interface on another site . Here we look at using thecommand file type and extension associations with the "assoc"commandThis tool is very useful for managing the relationship or association between file extensions and file types. the syntax isassoc [.ext[=[fileType]]]If the plain Command "assoc" is entered, you will get a list of what file types correspond to the extensions currently registered onthe system. The list can be quite long so it is best to redirect to a file or to pipe to the "more" Command so that one full screen ata time can be viewedassoc > or assoc | moreIf the only parameter is a file extension (including the leading period), the file type for that extension will be given.
10 For example,to see what file type is associated with .txt , enterassoc .txtSince the names used for the various file types may not always be obvious, the above can be a useful type of Command , In thiscase, the output would normally . To delete the file type association for the file name extension .xyz (use with care), enterassoc .xyz=Another use is to associate a given extension with a certain file type. As an example, to associate the extension .log with typetxtfile, enterassoc .log=txtfileNote that more than one extension can be associated with a file type. For example, the file type "jpegfile" typically has both theextensions .jpg and .jpeg associated with it. Also note that it is possible to create your own file extensions and to associatethem with a a Microsoft reference on assoc go here or to the Windows Help and Support Center.