Was using tasks.json and needed a way to iterate over a few file names $a = 'libhpdf.dll', 'libpng16.dll'; foreach($i in $a) { cp ${env:ow}/bin/$i C:/Users/bad-p/Desktop/Work` Folder/VS` CODE/test/ }