Mass Copy From CSV with Multiple Folders (delimiter)

Hi - I have a folder that includes various files that have different extensions (i’d like extensions to be ignored) and a CSV file that includes the file name as well as a second column with destination folder(s).

I want to copy the file from the source column(A) into multiple folders identified in column B (with delimiters, or if need to be a new column, that’s fine too).

Example: Filename TEST1 Needs to be copied to the folders: Folder1 and Folder2

Filename Test 2 Needs to be copied to Folder1 and Folder3, etc

 

Hey Michael,

Have you tried anything so far? Please put down your code here and let us know where you have been stuck, then we can assist you further.

If not tried, then refer to the CmdLets below, you will get some Idea.

Get-Content, ConvertTo-CSV, Import-CSV, ForEach-Object, about_Split and Copy-Item

Thank you.

Will you give an example of your csv file?
Does column A contain a full path or just file basename?
Does column B use a comma to separate multiple paths?