Use cmd command to quickly realize batch transfer of files

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

insert image description here

2. Enter the command

for /d %a in (*) do move "%a\*" . && rd /s /q "%a"

insert image description here

Guess you like

Origin blog.csdn.net/ChinaLiaoTian/article/details/128982117