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

Комментарии

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

Как преобразовать вертикальную запись в горизонтальную?

Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository … doesn't support architecture 'i386'

How to delete a folder in remote Windows from Linux