I have one file, let's call it image.png. I also have a folder of files like so:picture.pngfile.pngscreenshot.pngart.pngpainting.pngAnd so on.What I want to do is replace each file inside the folder with image.png, but I want to keep the name of the original (so picture.png is still called picture.png, but when viewed contains image.png.image.png does not have to be located inside the folder.I've tried this so far, but it doesn't seem to work:for file in 'folder' do    cp -f 'image.png'  $filedone
How do I replace all files in a folder with one file?
rename;file copy
cp should do what you want. The problem is that you are not iterating through a folder. You are only doing one iteration with the folder being the contents of the $file variable. Try iterating over the file globbing, like this:for file in folder/* do    cp -vf 'image.png'  $filedoneI added a -v so you can get more verbose output to see any error, but you could leave that off once you get the correct results.