Powershell copy files based on CSV contents
<p>Morning Powershell users,
I'm trying to copy files listed in a .CSV document from one directory to another based on their file name. My .CSV document is just one column of filenames, it looks like this:</p>

<pre><code>2.jpg
4.jpg
5.jpg
8.jpg
12.jpg
</code></pre>

<p>I have a folder of .jpgs from 1-900 in G:\Numbered\ and a destination folder for where the files should go at G:\Selections. This seems like it should be relatively simple but I think I'm missing something in my code. This is what I have so far:</p>

<pre><code>import-CSV G:\fileList1.csv | foreach {copy-item G:\Numbered G:\Selections}
</code></pre>

<p>I looked around and I think I may need to use Get-Childitem but I'm not sure where. Any help is greatly appreciated, thank you!</p>