Environment > Getting Started > Startup Files

# Startup Files

A startup file is a batch file that is executed automatically each time you start IDL. You can specify a startup file in one of two ways:

- Specify the name of the startup file in the IDL Workbench from the Window > Preferences > IDL menu option.
- Specify the name of the startup file as the value of the IDL_STARTUP environment variable. Note that this method works whether you use IDL in command-line mode or via the Workbench. If you use the Workbench and you set both the preference and the environment variable, IDL will use the value of the environment variable.

Common uses for startup file include the following:

- Restoring variable data contained in a SAV file or reading in commonly-used data.
- Setting common keywords to the DEVICE procedure.
- Setting up system graphic preferences.
- Specifying shared or private color maps for PseudoColor devices.

IDL executes startup files one statement at a time. It is not possible to define program modules (procedures, functions, or main-level programs) in the startup file.

## See Also

Executing Batch Jobs in IDL