Currently using this command to get all my "fanart" from my TV folder, and dump it into a single folder.
find /volume1/tv/ -type f \( -name '*fanart.jpg'* -o -path '*/fanart/*.jpg' -o -path '*/extrafanart/*.jpg' \) -exec cp {} /volume1/tv/_FANART \;
Here's the issue: a lot of these files have the same name, and can't be dumped into the same folder. Example:
Is there a way to copy these files from their respective folders and give them a unique name in the destination folder? Name needn't be anything descriptive, random is just fine.
Thanks!
1] Using Windows Explorer Go to the folder in which you want to copy the names using Explorer. If you want a complete list, use Ctrl + A to select all or select required folders. Click on the Home tab on the top menu, and then click on Copy Path. Finally, open Notepad or Excel or any text and paste.
USING CTRL+C AND CTRL+V TO COPY FILE NAMES IN EXCEL If you want to copy the name of a file in Excel, use CTRL+C and CTRL+V. The keyboard shortcut is Ctrl+c, followed by Ctrl+v on your PC or Command+c followed by Command+v on Mac.
find /volume1/tv/ -type f \( -name '*fanart.jpg'* -o -path '*/fanart/*.jpg' -o -path '*/extrafanart/*.jpg' \) -exec cp --backup=numbered {} /volume1/tv/_FANART \;
..
cp --backup=numbered {}
If the file exists, this will not overwrite but make a backup with a number assigned.
The files will be hidden. Ctrl+H
to view hidden files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With