Gulp copy single file (src pipe dest) with wildcarded directory
问题 I am trying to copy a specific file src C:\Project\dir1\dirv-1.0.0\tools\file.exe to a specific directory dest C:\Project\dir2\ using gulp. The version number in dirv-1.0.0 could change in the future, so I want to wildcard the version number. Here is the task I have for that ( gulpfile.js is in C:\Project ): gulp.task('copy', function(){ return gulp .src('dir1\dirv-*\tools\file.exe') .pipe(gulp.dest('dir2')); }); This ends up generating the following dest file: C:\Project\dir2\dirv-1.0.0