// Get directory name.
String path = getSelectedPath();
CommandData data = new CommandData();
data.addItem(Keys.DIR_NAME, path);
// Create command.
Delete delete = new Delete();
try {
delete.perform(data);
} catch (Exception exception) {
exception.printStackTrace();
}
// Refresh panels.
CommandData refreshData = new CommandData();