Session Manager

This small toolbox guarantee a set of function to manage a set of different projects. You can create, delete, save, load different projects switching between them directly in matlab.

Main Features

Getting Started

Type (or save as shortcut)


to open the complete user interface.

Read below for manipulate sessions programmatically.

Stored data

Each session is saved in a .mat file with .msession extension in your %userpath% folder on you local machine. This guarantees a safe place for sessions regardless of your current working path.

Each session file contains:

Each session will be uniquely identified by its .msession file name. To track current session the global variable CURRENT_SESSION____ is set. A local session is always named __local

Basic Usage

Create a new project 'CustomName' )

Create a new session named 'CustomName'. If you don't provide any session name as first parameter, a related dialog prompts asking for the preferred name. Note that this function simplying set global variable CURRENT_SESSION____ and it's equal to

CURRENT_SESSION____ = 'CustomName'

, no file is saved yet.

Save a project 'CustomName' )

Save current session. By default without arguments, it gets current session name from global variable CURRENT_SESSION____, otherwise use 'CustomName' as new session name, update current session accordly and save the CustomName.msession file. If no current session is available, a new one will be created.

Load a project

session.load( 'CustomName' )

Load the related session named 'CustomName' if it exists. If you don't provide any session name or if it doesn't exists, prompt a selection dialog with the complete list of all session avilable on your machine.

Loading a session will set current working direcotry, path and editor files. If another session is open asks you if you want to save it in advance.

Delete a project

session.delete( 'CustomName' )

Delete the related session named 'CustomName' if it exists. If you don't provide any session name or if it doesn't exists, prompt a selection dialog with the complete list of all session avilable on your machine.

Local Session

You can manage a local session using similar save and load function:


, the local session will store data in local.msession file in you current project root directory and set current session name to __local.

Import and export projects

You can import and export project msession files using

session.export( 'SessionName')
session.export( 'SessionName', 'TargetFilePath' )
session.import( 'SourceFilePath' )
session.import( 'SourceFilePath', 'SessionName' )

A file selection dialog will guide you to select the proper file to load or save. The imported session will be copied in local machine user directory.

Note that import and export works only on your local machine.

Linked sessions

Similar to import, linking an external session file simplying declare a session in local machine directory as virtual link, redirecting any operation (like save/load) to the linked session file. This permits you to save your msession file where you really want and update it directly without exporting it every time. 'SourceFilePath' ) 'SourceFilePath', 'SessionName' )
A useful way to use it is linking a local session to a global session to speed up your productivity simplying using local function but guarantee a global way to open you project maintaining you session file updated session.savehere 'local.msession', 'GlobalName' )
further you may update your startup.m file ...
and you finish.m accordly ...

Other utilities

Session listing

out = session.utils.folder

Displays local machine folder where sessions are saved

out = session.current

Displays current session name.

out = session.utils.list

List all local machine available sessions. If an output argument is provided, the function return a cell array with all session names, otherwise the list is displayed in console.



Save current session and exit

Future releases

This is a list of features not yet coded, but eventually will be included in future releases of this small toolbox:

Please contact me at for bugs, info or interesting debate about space-time continuum.