I have this code here that has been working for months now but suddenly decided to start throwing the exception in the if statement. Any ideas? Any other information that you need? The oldCSV.csv and newCSV.csv both exist in the directory already.
String filePath = "\\example\example\oldCSV.csv"
File oldFile = new File(filePath) // oldFile = "\\example\example\oldCSV.csv"
String parent = oldFile.getParent() // parent = "\\example\example"
File newFile = new File(parent, "newCSV.csv") // newFile = "\\example\example"
if(!oldFile.renameTo(newFile)) {
throw new Exception("Rename operation: ${oldFile.getName()} to newCSV.csv failed")
}