I have a NAS with a lot of photos, which are divided into different subfolders by month. It is too troublesome to find a specific photo, so I want to use the Windows command line to transfer these photos to the main folder. It can be achieved in two steps.
Final effect: The files in the subfolders are transferred to the main folder, and the subfolders are deleted.
1. Enter the main folder, enter cmd in the address bar
2. Enter the command
for /d %a in (*) do move "%a\*" . && rd /s /q "%a"