// Get directory name.
File file = getSelectedFile();
CommandData data = new CommandData();
data.addItem(Keys.FILE, file);
// Create command.
View view = new View();
try {
view.perform(data);
} catch (Exception exception) {
exception.printStackTrace();
}
}