Question

I have a file which I am using as a temporary file until the user selects to save this file, How do I go about making a copy of this file but at the same time re-naming it. Example below:

File 1:

/sdcard/Folder/file1.wav

File 2:

Copy of file 1, renamed to file2.wav in /sdcard/Folder/file2.wav

I understand using Environment.getExternalStorageDirectory().getAbsolutePath() gets me the path to the external storage so i'm not asking how I get to the sdcard or whatever. just to make a copy of a file and re-name it.

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top