When I have downloaded files from the remote server, I want to move them to an archive folder on the remote server. I use the mv command to do this as follows:
mv lcenewbkg-*.csv /home/samba/archive-bkgdata/
I have to use a wildcard as the filename is different each day.
The problem is, if one of the files covered by the wildcard already exists in the archive-bkgdata folder, the mv command does not move the files. If I use the GUI to move them manually, I am presented with a message to overwrite the file, but there doesn't seem to be any such option for scripting the mv comment. Am I missing something?
I have 'batch on' and 'confirm off', but I understand these are not relevant for the mv command.
So, how do I get the mv command to always overwrite the files in the remote folder? Or is there another way of doing it?