LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   copying multiple files in multiple folders ?? (https://www.linuxquestions.org/questions/linux-newbie-8/copying-multiple-files-in-multiple-folders-706403/)

stratotak 02-21-2009 08:05 AM

copying multiple files in multiple folders ??
 
I have a folder of drum samples.Kicks,snares,etc..

Code:

strat@frostbite:~/GSCW/Drum_Kit-1$ ls
14-Crash  22-RIDE  Hats-1  Kick-1  Snare hits-1  TOM-10-single  TOM-13-single
18-Crash  6-Splash  Hats-2  SnareFX  TOM-10-flams  TOM-13-flams

I want to copy the .wav files in each directory to another directory.and just the wav files.Not the directories themselves.what command would i use to do this..??I gave cp --help a look..but couldnt figure what command to use.

catweasel28 02-21-2009 08:17 AM

In source directory type:

cp -iv *.wav name_of_destination_directory

I always use the switches -iv so I see everything copying onscreen and don't overwite anything. You can omit them if you wish.

stratotak 02-21-2009 09:41 AM

you were almost right..lol.took about 10-15 minutes of trying different commands but eventually got it o work...

Code:

strat@frostbite:~/GSCW/Drum_Kit-1$ cp  */*.wav  /home/strat/Bohnam_kit/


All times are GMT -5. The time now is 07:28 AM.