Mark Butcher wrote:The only thing I know is to delete one single file as follows :...
Actually, that won't just delete files; it'll delete directories as well (or it may do), because a File can be either an actual file OR a directory.
I recommend that you study the File class documentation (java.io.File (←click)) carefully, because all the methods you need are contained in it. A look at the tutorials probably wouldn't go amiss either, because it also covers some of the java.nio.file package features (new with version 7) - in particular the Files class.
Isn't it funny how there's always time and money enough to do it WRONG?
Joined: Jun 28, 2012
Well, I am using java 6 and didnt find anything helpful in this context.
Atleast listing files with a particular prefix string would really help me.
If I create files prefixing my name as an identifier, lets say Mark1.xls, Mark2.xls,.......
These files belong to me and I can manipulate only those.
Now I want to delete only those files created by me, that is Mark1.xls to MarkN.xls