A few well-placed System.out.println() statements to verify what you are trying to delete would be a good place to start.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Definitely agree with ezzaral. Get your path, then println it, then call delete.
Also there are numerous things that could go wrong with file access/permissions. Make sure you either throw the exception or catch it and println it as well
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
short answer: yes (if you have permissions)
long answer: sort of, you can delete directories with this as well, but if its a directory thats not empty, it will not delete, ensure your files are not directories
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Are they List or List?
From what you described it sounds like file if so you can use this
Files2Delete.get(i).delete();
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
scratch my last post, you are adding strings
What does the println show you before the delete?
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
looks to be ok
are the files open and you have permissions to them?
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
ahhhh, when you create the files did you call the close() method?
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143