Ellie
Ellie

Reputation: 53

Combine multiple folders into one

I was trying to combine content( jpg files: IMG_6837.jpg IMG_6838.jpg IMG_6839.jpg IMG_6840.jpg) of following folders into one "July.2015", I tried many ways from former question posters (In terminal, merging multiple folders into one) but still does not work.
Hope you guys can help me out. Thanks so much!

July 1, 2015

July 17, 2015

July 19, 2015

Manchester - Robertson - Tolland Tpke, July 18, 2015

Mansfield - Connecticut, August 1, 2015

Mansfield - Connecticut, July 11, 2015

Mansfield, CT - Knollwood, July 15, 2015

Newport - Rhode Island, July 4, 2015

University of Connecticut - Mansfield, CT, August 4, 2015

University of Connecticut - Mansfield, CT, July 10, 2015

University of Connecticut - Mansfield, CT, July 13, 2015

Willimantic - Connecticut, July 23, 2015

Upvotes: 1

Views: 250

Answers (1)

Emacs User
Emacs User

Reputation: 1475

Assuming all those folders are under a folder called UNMERGED, then do this:

$ for f in /UNMERGED/* ; do rsync -a ./$f/ ./MERGED/ ; done

Upvotes: 1

Related Questions