Just specify the same path in
srcanddest.Yes you can. See Building the files object dynamicallyBuilding the files object dynamically
Example copied from the docs:
grunt.initConfig({ minify: { dynamic_mappings: { // Grunt will search for "**/*.js" under "lib/" when the "minify" task // runs and build the appropriate src-dest file mappings then, so you // don't need to update the Gruntfile when files are added or removed. files: [ { expand: true, // Enable dynamic expansion. cwd: 'lib/' // Src matches are relative to this path. src: ['**/*.js'], // Actual pattern(s) to match. dest: 'build/', // Destination path prefix. ext: '.min.js', // Dest filepaths will have this extension. }, ], }, }, }); This pertains to Grunt 0.4