Picture frame project, managing files
Posted: Wed Nov 21, 2018 3:59 pm
I'm updating an electronic picture frame I made a long time ago and need to find or create a script to avoid duplicate file names but don't know where to start. All drives and directories are mounted and accessible, slide show script is running, and I've automated adding new pictures to the frame. It hangs on the living room wall and runs 4 hours per night, which makes adding pictures inconvenient when it's not running. So I have a directory on a NAS drive where I put pictures to be added to the frame, and they get copied over when it boots. The issue is the frame is over a decade old so now has several thousand pictures and I'm running into file name duplication issues. What I have is:
Directory 1 - Pictures on the frame that are displayed randomly
Directory 2 - Pictures to be added to the frame, on the NAS that get copied to directory 1 when the frame boots.
Directory 3 - Pictures that have been copied to the frame, on the NAS (just a way to check to make sure it's working)
Directory 4 - Pictures moved from directory 2 because they had the same file name as a picture in directory 1, that have not been copied to the frame. I'll manually rename these and put back into directory 2
What I'm trying to do is compare file names in D2 to D1. When there is a match move that file (or those files) from D2 to D4, then copy the remaining non-matching files from D2 to D1 and D3, then delete the contents of D2.
I haven't been able to find a script to do this and creating one is beyond my skill level. Any advice would be appreciated. I'm not a programmer so this modification may be a lost cause. Thanks in advance.
Directory 1 - Pictures on the frame that are displayed randomly
Directory 2 - Pictures to be added to the frame, on the NAS that get copied to directory 1 when the frame boots.
Directory 3 - Pictures that have been copied to the frame, on the NAS (just a way to check to make sure it's working)
Directory 4 - Pictures moved from directory 2 because they had the same file name as a picture in directory 1, that have not been copied to the frame. I'll manually rename these and put back into directory 2
What I'm trying to do is compare file names in D2 to D1. When there is a match move that file (or those files) from D2 to D4, then copy the remaining non-matching files from D2 to D1 and D3, then delete the contents of D2.
I haven't been able to find a script to do this and creating one is beyond my skill level. Any advice would be appreciated. I'm not a programmer so this modification may be a lost cause. Thanks in advance.