Command Prompt Basics

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Working in the command prompt can be quite confusing, 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[edit | edit source]

  • 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.


  • You can copy & paste into the commandline window when you right-click with the mouse.


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


  • Every commandline command supports the parameter /? 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 folder where the current folder is in.

Important Commands[edit | edit source]

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[edit | edit source]

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.