Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi,
I am trying to add label on files but CmdRunner returning null. When I run the command created by com.mks.api.Command on command prompt its adds labels on file.
Code as given below,
public static void addLabel(String username, String password,
String filepath, String label,
String filename, String fileversion) {
Command cmd = new Command("si", "addlabel");
cmd.addOption(new Option("project", filepath + "/project.pj"));
cmd.addOption(new Option("label", label));
cmd.addOption(new Option("revision", fileversion));
cmd.addSelection(filename);
Session session = IntegrationPointFactory.getInstance().
createIntegrationPoint("xxxx.xxxx.com",
6786, true,
4,
12)
.createSession(username, password);
session.setAutoReconnect(true);
CmdRunner cr = session.createCmdRunner();
cr.execute(cmd);
}
Generated Command: si addlabel --project=/abc/xyz/test/project.pj --label="LabelParam1#LabelParam2" --revision=1.2 -- FileName
Please help.
Message was edited by: Gajanan Hole
It's working, it was problem with file name's case sensitiveness. I didn't know that file name is case sensitive.