String path = "c:\\hoge\\hoge.txt";
File file = new File(path);
String parent = file.getParent();