Move the files to a new folder, add the new path as a library, click scan.
Files are stored in the database by file hash and when the same file with the same hash is found in a different folder it will update the database with the new path.
So the location is not updated, there is a duplicate entry in the db. It now shows files (2).
So I then should empty the first directory and rescan it to remove the entry in the db? Or will that generate a missing file and I have to clean the db?
Did you re-name the file when you moved it? In my experience, renaming will cause Stash to see it as a new file.
You shouldn’t get a duplicate as long as there isn’t still a copy in the original location.
Just moving a file should show an entry in the logs indicating the file moved and the path was updated.
If you renamed it, you’ll probably need to run a clean on that library to remove any files that are no longer present.