Per windows prova cosi:
codice:
String command ="cmd /c del \""+dir+"\\resource\\*.dot\"";
Se sei su linux:
codice:
String command = "bin/bash -c rm \""+dir+"/resource/*.dot\"";