[Tutorial] The Command Prompt and You

#1
10 years ago
eliw00deliw00d General-MajorPosts: 1,081
A love story.

The Command Prompt can be challenging for those that did not grow up using MS-DOS or similar Command Line Operating Systems. So, I have decided to write a quick tutorial for those struggling to understand how to use tools that make use of this, such as Cope's excellent tools or Relic's recently released Archive.exe.

You can open the Command Prompt through the Start menu by typing "cmd" into "Search programs and files" (assuming that you have Windows 7 or similar) and hitting enter. A window should pop up with a textual prompt that looks something like this:
C:\Users\eliw00d>

With a blinking "_".

From here, you can navigate to anywhere on that drive, or to another drive entirely. I personally have a separate hard drive for games, which uses drive letter D. So, I will give an example of how I would navigate to my Steam folder.

To change drives, you simply type the drive letter followed by a colon. So, in my case, I would type the following into the prompt, followed by enter:
C:\Users\eliw00d>D:

Now, the prompt looks like this:
D:\>

Which means that you are in the root of that drive.

To change directories (folders), you use the command "cd" followed by the path you wish to navigate to. So, in my case, I would type the following into the prompt, followed by enter:
D:\>cd Steam\steamapps\common\Company of Heroes 2

Now, the prompt looks like this:
D:\Steam\steamapps\common\Company of Heroes 2>

From here, I would like to run Relic's Archive.exe, so I simply type that in and hit enter.
D:\Steam\steamapps\common\Company of Heroes 2\>Archive.exe

Without parameters or switches, Archive.exe will automatically display the required (or optional) parameters and switches that can be used. It also includes an example of how what it should look like when adding said parameters or switches to the execution.

By following the above steps, you can also run Cope's tools in the same way, such as pc2sga.exe. Please refer to the instructions Cope has included with these tools, as they have the parameters and switches you will need to properly execute the tools.

You can also create Batch files, which are essentially pre-written commands that, when run, issue these commands automatically to the Command Prompt. The commands are interpreted relative to the location of the Batch file, so they are useful for things like telling pc2sga.exe to pack all local folders and create archives in a different folder (which is what the included packageMod.bat in my ExampleMod does).

I hope this helps!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

  • © SEGA. SEGA, the SEGA logo, Relic Entertainment, the Relic Entertainment logo, Company of Heroes and the Company of Heroes logo are either trademarks or registered trademarks of SEGA Holdings Co., Ltd. or its affiliates. All rights reserved. SEGA is registered in the US Patent and Trademark Office. All other trademarks are the property of their respective owners.