1

On my Synology station I have a huge photo archive with the following structure:

/volume1/photo/2019/
                +--January
                    +--@eaDir (hidden folder)
                         +--001.jpg (folder)
                               +-- THUMB.jpg
                         +--002.jpg (folder)
                               +-- THUMB.jpg
                    +--001.jpg (image file)
                    +--002.jpg (image file)

I want to copy the thumbnails (not the actual images) to a different volume but keep the basic folder structure like this:

/volume2/thumbnails/2019/
                +--January
                    +--001.jpg (former thumbnail)
                    +--002.jpg (former thumbnail)

What I tried was:

find /volume1/photo/2019/ -name '*PREVIEW.jpg' -exec cp --parents \{\} /volume2/target/ \;

But this still keeps the hidden @eaDir folder and I cannot figure out how to omit them.

Can anyone help me out here?

Hennes
  • 65,142
hendrix79
  • 11
  • 2
  • Welcome to Super User! Please note that https://superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?. – DavidPostill Nov 03 '19 at 21:14
  • My hint is the bold text in this answer. Can you take it from here? You need to decide if you find thumbnails and let the script determine the corresponding name, or you find big files and let the script locate the corresponding thumbnail for each. In any case it's about manipulating paths, strings stored as shell variables. – Kamil Maciorowski May 22 '20 at 11:05

0 Answers0