Menu

Basic Usage

Davo Mac

Command Line Programs 101

This guide will assume that you're running Windows. If you're on Linux, I assume that you know what you're doing.

The command line is the DOS-looking window with the white text and black background. To get there on windows;

  1. Hold down your Windows key in the bottom left corner of your keyboard and press "R"

In that window that popped up, type in "cmd" and hit Enter

From here, you can run programs with things after it called "arguments" for example;

dir C:\

This will run the "dir" program which will list all of the items in "C:\" which is the argument.

You can also use;

dir /B C:\

This time, we added another argument called a "switch". The /B switch makes dir print a very basic list of folders instead of it's nice & pretty list from before.

SEMU Usage

semu.exe "save-path" [--switches]

To run SEMU straight from cmd, its easiest to drag 'n drop the EXE onto the window, hit space, drag 'n drop the save folder onto the window, hit space and then type in the switches you want to use.

For a list of switches and what they do, type in --help or -h.

Starting without CMD

We're not all robots, and I don't expect you to start CMD and type in all that every single time you want to clean your server. There are easier and better ways to do it.

Shortcuts

  1. Make a shortcut to the SEMU program
  2. Right-click on the shortcut and click on Properties
  3. In the "target" window, add the arguments onto the end

This is nice & simple but if something goes wrong, the window will quickly close and you won't be able to see what happened.

Simple Batch Script

  1. Open Notepad, then copy & paste the below script into it;
  2. Edit semupath, savepath and switches to your liking.
  3. Click on File > Save As.
  4. Change File Type to Any (.) and save it as "Run SEMU.bat".

And you're done. Now to maintain that save, all you need to do is double-click on that batch file and BAM, you're done.

~~~~~~
@Echo off
title Basic SEMU Starter
echo Basic SEMU starter script
echo By David McDonald 18/07/2014
echo =============================

rem For the paths, no quotation is required
rem >> " << those things

rem Edit this bit and put in the path to semu.exe
rem E.g. C:\users\davo\Desktop\semu.exe
set semupath=

rem Edit this bit and put in the folder of the save you want to maintain
rem E.g. C:\users\davo\appdata\roaming\Space Engineers\saves\747586384765\My Asteroid Field
set savepath=

rem Put the switches you want to run in here
rem E.g. --prune-players --prune-factions
set switches=

rem Echo it back
echo SemuPath: %semupath%
echo SavePath: %savepath%
echo Switches: %switches%

rem HERE'S THE GOODS
"%semupath%" "%savepath%" %switches%

rem Pause so they can see what just happened
pause
~~~~~


Related

Wiki: Home

MongoDB Logo MongoDB