I\'m trying to list a directory\'s contents, and rename certain files.
public void run(String dirName) { try { File parDir = new File(dirName);
You need to create your new File object with the full pathname of those files. So
File
String name = f.getName(); // gets the name without the directory
should likely be:
String name = f.getAbsolutePath();
(your search/replace may need to change)