# Lost metadata when moving files into subdirectories

**URL:** <https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640>\
**Category:** Metadata & Adding Files\
**Tags:** server-synology, metadata\
**Created:** [June 16, 2023, 7:31pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640 "2023-06-16T19:31:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joey\_Jay](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joey_jay/32/290313_2.png) [@Joey\_Jay](https://forums.plex.tv/u/Joey_Jay)\
**Post date:** [June 16, 2023, 7:31pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/1 "2023-06-16T19:31:28Z")

</div>

My Plex Movies directory is starting to get uncomfortably long, so to make management easier I thought I would subdivide that directory into 26 directories, one for each letter of the alphabet.

I did a test on the titles beginning with A, and it appeared to go OK. Plex showed the titles as they were already with metadata intact.

Then I started moving more directories. And now Plex is seeing some of those moves as completely new titles, losing all the metadata I had customized for them.

Am I missing something or is this an unreliable way to move files?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 16, 2023, 8:06pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/2 "2023-06-16T20:06:06Z")

</div>

Yes, you’re missing two steps in the process.

1. ADD the new directories first. Let PMS scan them to know they are empty
2. TURN OFF “Empty Trash”
3. TURN OFF “Automatically detect” (you want scanning control right now)
4. Move a block of media.
5. Scan Files
6. Examine one. Notice PMS has two locations for it – expected
7. Complete moving of data
8. Scan Files again – Let PMS update paths to the new location
9. EDIT the library section again – REMOVE the old directory
10. Scan
11. Empty Trash
12. Clean Bundles
13. Enable automatic
14. Enable Empty Trash

This is for Synology but works everywhere

> [@Linux Tips](https://forums.plex.tv/t/linux-tips/276247/19):
>
> Moving your media and keeping the metadata - The TL;DR This Tip / How-To, while tagged for Linux, is applicable to all PMS platforms. Preparation Turn off “Empty Trash after Library Scan” Turn off “Automatically Update my Library” Move your media Make any configuration changes or physical media file moving you need to. When you are done, proceed with the actual PMS configuration change Updating your PMS configruation Edit each library section - Folders - ADD the new location. DO N…

---

<div class="post-metadata">

**Author:** ![Joey\_Jay](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joey_jay/32/290313_2.png) [@Joey\_Jay](https://forums.plex.tv/u/Joey_Jay)\
**Post date:** [June 16, 2023, 8:17pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/3 "2023-06-16T20:17:00Z")

</div>

Regarding step 9, “remove the old directory” … there is no old directory. I am moving into subdirectories of an existing directory.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 16, 2023, 8:21pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/4 "2023-06-16T20:21:49Z")

</div>

“Remove Old Directory” … from where PMS is looking.

If you have Movies/

and change to `Movies/90s` , `Movies/00s`, etc

then, when done, remove `Movies/` from the top level list.  
If you don’t, you will get “Movies” as part of the title when it tries to match – MESS 🙂

The "Old Directory’ in this case is where you’re moving FROM .

Rethink this as :

ADD new structure to list of directories PMS monitors  
SCAN  
Turn off Empty Trash & Automatic functions  
Move files  
SCAN  
REMOVE old monitored directory IF appropriate.

---

<div class="post-metadata">

**Author:** ![Joey\_Jay](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joey_jay/32/290313_2.png) [@Joey\_Jay](https://forums.plex.tv/u/Joey_Jay)\
**Post date:** [June 16, 2023, 8:36pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/5 "2023-06-16T20:36:14Z")

</div>

Is there a way I can restore the metadata from the files that were moved already? Should I move them back to where they were and restore a backup version of the database and start over?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 16, 2023, 8:57pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/6 "2023-06-16T20:57:43Z")

</div>

If the metadata already got removed (empty trash & clean bundles) then it’s gone.

- Custom metadata / posters / etc are stored in the bundles.

–OR–

- Yes, you can move the files back and restore backups of the whole directory structure. Just restoring the database is of no help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [September 14, 2023, 8:58pm UTC](https://forums.plex.tv/t/lost-metadata-when-moving-files-into-subdirectories/844640/7 "2023-09-14T20:58:16Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
