-1

I ask a few questions here and every time I am very pleased with the answers, so here we go again.

I have three folders inside the folders the files have the same names except for the file structure:

1 folder with .zip
1 folder with .7zip
1 folder with different folders

I really would like to get all the matching files from the .zip. So .zip is leading and I am looking for a batch file that will copy the files from the other folders.

I really hope this makes any sense :) English isn’t my first language.

sKhan
  • 9,694
  • 16
  • 55
  • 53

1 Answers1

0

Use the find command.

find . -regex '.*\.zip' -exec cp {} target_dir \;

Robin Davis
  • 622
  • 4
  • 10