Need help how to make script working.
Posted: 05 Feb 2022 10:31
I have hundreds of JPEG images in folders (folders already divided by date) need to split images into sub-folders by time created.
How can above described stacking be implemented using windows command line (batch file) with actual JPEG file on my windows explorer?
Lets say i want to group files that have 10 seconds time gap between creation.
How can above described stacking be implemented using windows command line (batch file) with actual JPEG file on my windows explorer?
Lets say i want to group files that have 10 seconds time gap between creation.
- Sort files by "date modified" Ascending
- Set first file (time modified is 2:51:15) as reference point for comparison
- Check second file in list IF time modified is 2:51:17 (within 10 seconds gap from reference point file) then:
- create sub-folder, name sub-folder with name of first file (minus extension) and move both first and second files there - Check third file IF time modified is 2:51:23 (within 10 seconds gap) then move third file into previously created sub-folder as well
- Check fourth file IF time modified is 2:51:45 (more than 10 seconds gap from reference point file) then don't move fourth file into sub-folder:
- stop comparison against first file, set fourth file (time modified 2:51:45) as reference point for comparison - Check fifth file IF time modified is 2:51:49 then
- create sub-folder, name sub-folder with name of fourth file (minus extension) and move both fourth and fifth files there - If sixth file time modified is 2:53:18 (more than 10 seconds gap from reference point file (fourth)) then:
- stop comparison against fourth file, set sixth file (time modified 2:53:18) as reference point for new comparison - And so on until all files are checked and moved into sub-folder.