I want to parse the file names of multiple doc files (MS office) using java. How should I go about doing this?
I was able to find an API on extracting info from the doc itself, but I can't find information on the file name itself.
So say I have a doc file XX_232312_22, I want to just parse the file name (ie 232312 part).
EDIT: What would we do if we need to parse more than just one file? For instance, all 1000 files in one directory?
new File("path/file.doc").getName()?angelsoft2311out ofangelsoft2311-1? Am I right? OR do you have anymore issues in getting file name.file.getName().replaceFirst("\\.\\w+$", "");