How to rename a file name without change its type?

Boolean rename = filediriden. RenameTo(newfilediriden); if(filediriden.isFile()){ After you rename the file, the old File object ( filediriden ) still points to the old name, which no longer exists. You want to check using the new File object ( newfilediriden ) filetype1 Also, there could be files with more than one dot in them, so maybe filetypefiletype.

Length-1 is safer.

Boolean rename = filediriden. RenameTo(newfilediriden); if(filediriden.isFile()){ After you rename the file, the old File object (filediriden) still points to the old name, which no longer exists. You want to check using the new File object (newfilediriden).

Filetype1 Also, there could be files with more than one dot in them, so maybe filetypefiletype. Length-1 is safer.

The problem is you're checking the filedirden instead of newfiledirden. At the point of test, filedirden doesn't exist anymore, as the file it points to was renamed.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions