I've a folder that has both image and video folders which I want to separate into separate folders based on the file type. I want this to be a script so that i can re run it when more files are imported
Current file structure
Currently images and videos are in a folder where they are combined by date
Images/ 2018-08/ image1.png Video1.mp4 2018-09/ image1.png video1.mp4
After running the script I would like the folder structure and file names been retained with the point of having the images remain in the images structure and the videos being moved into a separate structure.
Images/ 2018-08/ image1.png 2018-09/ image1.png Videos/ 2018-08/ Video1.mp4 2018-09/ video1.mp4
What i've tried so far
I've looked at the windows move command but it seems only to apply to a single folder.
Also I looked at then solution to How to copy files and keep the structure?. It almost solves my problem except I don't have a predefined list of files just pre defined extension and starting folder.
- The Higher folders e.g. Images and Videos will be predefined and are static
- The sub-folders below images need to be automatically replicated
- File names may duplicate between moves