Can you remove a folder structure when copying files in gulp?

gulp

Solution

You could use `gulp-rename` to accomplish this:

var rename = require('gulp-rename');

gulp.src('app/client/**/*.html')
  .pipe(rename({dirname: ''}))
  .pipe(gulp.dest('dist'));

Problem

If I use : ``` gulp.src(['app/client/**/*.html']) .pipe(gulp.dest('dist')); ``` The folder structure in which my `.html` files were in, is maintained in the `dist` folder, but I would like to remove the folder structure completely and just a flat hierarchy in my `dist` folder.

Original source