What is the best procedure when moving movie/photo files to new directory?

(I did a search here on the Discourse forum).

Situation:

  • I am reorganizing my collection. So moving files to new disks, creating new directories etc.
  • I have a stash database with identified scenes, markers, tags etc. I prefer not to redo all my work.
    Question:
  • What is the best procedure to have stash update only the location of the files, and nothing else?
1 Like

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.

So the procedure should include:

  • Move, not copy files to new location
  • Scan new location, this adds a new file entry for the same scene
  • Scan old location, this removes files that are not present any more
    Then possibly:
  • Clean the database???

Copying files and have the old location serve as a backup will work, but the backup remains in the database.