Difference between revisions of "Command Prompt Basics"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>JOG
m (Comand Prompt Tutorial moved to Command Prompt Basics)
imported>JOG
Line 1: Line 1:
Working in the command prompt can be quite confusing for some users, here are some hints to ease up your work:
Working in the command prompt can be quite confusing for some users, here are some hints to ease up your work.


== Basics ==
----


First of all, use Microsoft's "Cmd Here Powertoy".
First of all, use Microsoft's "Cmd Here Powertoy".
Line 8: Line 8:
http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/CmdHerePowertoySetup.exe
http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/CmdHerePowertoySetup.exe


----


Typing in a command in the command prompt (also called "commandline" "console" or "DOS-shell") does the same as doubleclicking a shortcut on the desktop, with the difference that you can give parameters to the program directly.


For Windows to find the program, it needs to know where to search for it. You can copy a comandline-tool to the folder you're currently working in, or to ''C:\Windows'' or to any other folder that is returned when you type in '''Path''' in the commandline.
== Rules ==
 
*Typing in a command in the command prompt (also called "commandline" "console" or "DOS-shell") does the same as doubleclicking a shortcut on the desktop, with the difference that you can give parameters to the program directly.
 
 
*For Windows to find the program, it needs to know where to search for it. You can copy a comandline-tool to the folder you're currently working in, or to ''C:\Windows'' or to any other folder that is returned when you type in '''Path''' in the commandline.
 


To add new folders to this path, open the Control Set, go to System/Extended and press "Environment Variables" in that menu double click on "Path" (or create a new entry if it doesn't exist) and add the new folders, separated by ";"
*To add new folders to this path, open the Control Set, go to System/Extended and press "Environment Variables" in that menu double click on "Path" (or create a new entry if it doesn't exist) and add the new folders, separated by ";"


== Rules ==


*While working in the command prompt, you can use the cursor keys, to browse trough the commands you've just entered (just like in Oblivions console), this is very useful when you typed in something wrong.
*While working in the command prompt, you can use the cursor keys, to browse trough the commands you've just entered (just like in Oblivions console), this is very useful when you typed in something wrong.


*Always remember that computers are stupid. To separate parameters from each other, the command prompt uses the space (' ') if you need to enter a parameter that contains a space (e.g. '''C:\Program Files''') you need to enclose the parameter in quotes ('''"''') so that the text is interpreted as one single parameter instead of two.
*Always remember that computers are stupid. To separate parameters from each other, the command prompt uses the space (' ') if you need to enter a parameter that contains a space (e.g. '''C:\Program Files''') you need to enclose the parameter in quotes ('''"''') so that the text is interpreted as one single parameter instead of two.


*Most commands support the placeholders ("wildcards") "'''*'''" (any text) and "'''?'''" (one letter) to access several files at once.  
*Most commands support the placeholders ("wildcards") "'''*'''" (any text) and "'''?'''" (one letter) to access several files at once.  


*Every commandline command supports the parameter /? or -? to displays it's complete syntax.  
*Every commandline command supports the parameter /? or -? to displays it's complete syntax.  


*When you want to access another directory than the current one type in the path relative to the current one: "." stands for the current folder, ".." for the foder where the current folder is in.
*When you want to access another directory than the current one type in the path relative to the current one: "." stands for the current folder, ".." for the foder where the current folder is in.





Revision as of 07:50, 17 June 2006

Working in the command prompt can be quite confusing for some users, here are some hints to ease up your work.


First of all, use Microsoft's "Cmd Here Powertoy". It adds a "Open Command Window Here" option to the context menu. After installing this you can easily open a command folder in any folder just by right-clicking on the folder and choosing "Open Command Window Here".

http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/CmdHerePowertoySetup.exe


Rules

  • Typing in a command in the command prompt (also called "commandline" "console" or "DOS-shell") does the same as doubleclicking a shortcut on the desktop, with the difference that you can give parameters to the program directly.


  • For Windows to find the program, it needs to know where to search for it. You can copy a comandline-tool to the folder you're currently working in, or to C:\Windows or to any other folder that is returned when you type in Path in the commandline.


  • To add new folders to this path, open the Control Set, go to System/Extended and press "Environment Variables" in that menu double click on "Path" (or create a new entry if it doesn't exist) and add the new folders, separated by ";"


  • While working in the command prompt, you can use the cursor keys, to browse trough the commands you've just entered (just like in Oblivions console), this is very useful when you typed in something wrong.


  • Always remember that computers are stupid. To separate parameters from each other, the command prompt uses the space (' ') if you need to enter a parameter that contains a space (e.g. C:\Program Files) you need to enclose the parameter in quotes (") so that the text is interpreted as one single parameter instead of two.


  • Most commands support the placeholders ("wildcards") "*" (any text) and "?" (one letter) to access several files at once.


  • Every commandline command supports the parameter /? or -? to displays it's complete syntax.


  • When you want to access another directory than the current one type in the path relative to the current one: "." stands for the current folder, ".." for the foder where the current folder is in.



Important Commands

dir   show content of the current directory
cd    show or change current directory
md    make new directory
rd    remove directory (use parameter /s to delete directorys that contain files)
copy  "copy file1 file2" = make a copy of "file1" and name it "file2"
ren   rename file


Examples

dir myfolder   shows the contents of "myfolder" 
cd ..\         goes back one level in the folder-tree.
copy ..\myfolder\*.* . copies all files in "..\myfolder" to the current folder.
ren *.nif Mymod_*.nif puts a "Mymod" in front of all nif files in the current folder.