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