Mass Copy From CSV with Multiple Folders (delimiter)

Welcome Forums General PowerShell Q&A Mass Copy From CSV with Multiple Folders (delimiter)

Viewing 2 reply threads
  • Author
    • #211620
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      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


    • #211677
      Topics: 3
      Replies: 223
      Points: 1,221
      Helping Hand
      Rank: Community Hero

      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.

    • #211734
      Topics: 5
      Replies: 323
      Points: 470
      Helping Hand
      Rank: Contributor

      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?

Viewing 2 reply threads
  • The topic ‘Mass Copy From CSV with Multiple Folders (delimiter)’ is closed to new replies.