## How to Recursive Search and Copy In powershell (right click the start menu and you'll get the Win+X menu) ```powershell cd $Env:UserProfile\Documents Set-Variable -name crate -value $Env:UserProfile\Documents\TheCrate mkdir $crate cd SourceDir get-childitem -recurse -include *.wav | foreach { cp $_ $crate } ``` That will put everything into a single folder, which is probably what you want. Even if not, you can then use the file manager to organise things afterwards. ## Copy Preserving Directory Structure ```powershell $source = $Env:UserProfile\Documents\SourceDir cd $source $tgt = $Env:UserProfile\Documents\TargetPath if( -not (test-path -path $tvt) ) { mkdir $tgt } Get-ChildItem -recurse -include *.wav | select-object -first 100 | foreach { $r = resolve-path -relative $_; $t = $tgt + "\" + $r; $d = split-path -parent $t; if( -not (test-path -path $d) ) { mkdir $d }; if( -not (test-path -path $t) ) { cp $_ $t }; } ``` ## Macos Zips See [this stackoverflow](https://stackoverflow.com/questions/8677628/recursive-file-search-using-powershell) for a few more examples of this kind of search. Deleting those annoying `._whatever` files you get when unarchiving a `.zip` on Windows or Linux. ```powershell get-childitem -path c:\path\to\files -include ._* -Recurse get-childitem -path d:\mydir -include ._* -Recurse | foreach { echo $_ } get-childitem -include ._* -Recurse | foreach { Remove-Item $_ } # will start from current directory ``` for reference, on Windows under Cygwin or WSL, you can use ```bash find /path/to/files -name ._\* -exec rm -v {} \; ```