How to delete a folder in remote Windows from Linux

I am running automation tests on both local (Linux) and remote Selenium node (Windows). And I want to delete a folder created during test, using Java Runtime.getRuntime().exec. It works fine on local (Linux), but I have a hard time to figure out how to do it on Windows node. The following is my attempts:
try {
    if (rBundle.getString("RUN_ON").equalsIgnoreCase("local")) // delete folder temp on local (Linux) - it works
        Runtime.getRuntime().exec("rm -rf " + System.getProperty("user.home") + "/Temp");
    else // delete folder C:/Temp on remote Windows
        Runtime.getRuntime().exec("rm -rf IEUser@10.2.2.240/C/Temp");
        // Runtime.getRuntime().exec("rm -rf //10.2.2.240/C/Temp");
} catch (IOException e) {
    e.printStackTrace();
}
I try to delete folder C:/Temp on the remote Windows, but I don't have any success. I don't get any Exceptions, it went though that block. Obviously the command line is wrong, but I have no idea.
Any help much appreciated. Thanks

Комментарии

Популярные сообщения из этого блога

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target

TeXnicCenter does not work with Adobe anymore