I have a filename with the complete filepath which I would like to rename the file, put it in another folder.
The copying of the file to a new folder work, but I am struggeling with the renaming.
I am converting the filename to a String:
I get a result looking something like this: "C:\Temp\Arkiv\file01.jpg"Code:
String fileName = file.toString();
I am then trying the split method to get the fileextension:
But it does not work. :(sweat):Code:
String  splitter = fileName.split(".");
String file1 = splitter;
String ext = splitter;
String filename = "newfile" + "." + ext;
The splitter is emty (0).