-2

I've got:

C:/PICS/ASF/photos/files (.jpg)

C:/PICS/DFS/photos/files (.jpg)

C:/PICS/HGD/photos/files (.jpg)

C:/PICS/FTG/photos/files (.jpg)

.....etc

In every "photos" directory is more than one .jpg file

I want:

C:/PICS/ASF/files (.jpg)

C:/PICS/DFS/files (.jpg)

C:/PICS/HGD/files (.jpg)

C:/PICS/FTG/files (.jpg)

.....etc

Can someone help me with a .cmd that is doing this job?

Best Regards

Alin
  • 3
  • 3
  • 1
    `move photos\*.* .` will move each file in Photos up one level into the current directory. There are literally dozens of existing questions here about iterating through folders in a batch file. Please make at least a basic effort to do something yourself first. We're not a code writing service. – Ken White Jun 10 '16 at 23:20
  • What did you try on your own? please share your code and describe where you are stuck! – aschipfl Jun 11 '16 at 11:15

1 Answers1

0
@echo off
Cd C:/PICS
For /d %%i in (.) Do (
Cd "%%i"
Move photos/*.jpeg .
CD..
)
Rishav
  • 3,818
  • 1
  • 31
  • 49