I want to move and replace a file example cat.txt with another file example dog.png in such a way that in the folder now only dog.png only exists.
I don't want to remove cat.txt and add dog.png which is a 2-step process. I want to replace.
These are 2 files with different names.
I am planning to rename dog.png to cat.txt and then after moving and replacing the original cat.txt with new cat.txt, I will rename back the new cat.txt as dog.png