Johnny_hunter wrote:This is no longer programming related right? If so, use Microsoft's process explorer.
my mistake - actually I meant to say the file is opened by another process, not locked. In that case, how can I find out which process opened it? It might help me investigate.
The app is for Windows.
Thats where the action fails. My best guess is that the Swing component is holding the file's handle therefore it's qualified as opened by "another process".
boolean b = new File("C:\\temp\\elephnt.ttf").renameTo(new File("C:\\Users\\John\\Documents\\elephnt.ttf")); System.out.println(b);
I think this still has some relevance to programming, particularly to Swing programmingHow can renaming a file have anything to do with Swing programming?
I chose the menu item "Move to folder" to move the select file, the code looks likeHow can renaming a file from one constant name to another constant name have anything to do with a 'selected file'?
boolean b = new File("C:\\temp\\elephnt.ttf").renameTo(new File("C:\\Users\\John\\Documents\\elephnt.ttf"));