A command is an action you can perform in PICO-8 by typing it at the command prompt. Commands are used to load and save cartridges, manage files, and launch the Splore cartridge explorer.
Executing commands[]
Unlike functions, you do not use parentheses after the command name. For commands that take arguments, you type each argument after the command separated by spaces. String arguments such as filenames are not surrounded by quote marks.
> load jelpi.p8
Almost all commands can be called by source code as functions, but some do not work in code, such as most file operations. The ones that do work use parentheses around the argument list, quotes around string arguments, and commas between arguments. Most commands don't do anything useful when called from code.
-- load a new cart, overwriting this one
load('jelpi.p8')
-- list /carts/ directory and save a table of results to a variable
dir=ls("")
Help and information[]
Files and folders[]
backup
cd [dirpath]
dir
export filename
folder
import filename
load filename
ls
mkdir dirname
save [filename]