I am creating a file based on the another. So if the original is called doc.txt and is in myDocs I want to have it called docv2.txt and also saved in myDocs.
All I need is to define the new files path I can do the rest. Please help me determine what that path would be.
I am creating a file based on the another. So if the original is
Share
Of course, you might want to improve this code in case you want to support files without any dot in their name.
This is basic String and File manipulation. Check the javadoc of those two classes: that’s how you’ll learn how to use them.