I'm stuck in a situation.
String tmpfolder = System.getProperty("java.io.tmpdir");
\\this is the path C:\Users\biraj\AppData\Local\Temp\
tmpfolder = tmpfolder.replace("\\", "\\\\");
Runtime.getRuntime().exec("cmd /c del "+tmpfolder+"IEDriver.dll /f /s /q");
When I run this code it does not delete the IEDriver.dll
file.
But when I give the static path of the temporary folder then it deletes that file:
Runtime.getRuntime().exec("cmd /c del C:\\Users\\biraj\\AppData\\Local\\Temp\\IEDriver.dll /f /s /q");
Can anyone explain to me why the first code didn't work? What's wrong in that?