Use moveFile() for that. But pay attention that the "destPath"-Parameter not only contains the new filename but also the whole path.
Most helpful comment
Use moveFile() for that. But pay attention that the "destPath"-Parameter not only contains the new filename but also the whole path.