Import-csv SubString in the pipeline

Welcome Forums General PowerShell Q&A Import-csv SubString in the pipeline

This topic contains 1 reply, has 2 voices, and was last updated by

4 years, 6 months ago.

  • Author
  • #18398

    Points: 0
    Rank: Member

    I am using import-Csv which is returning 1 field(column) of file paths. These paths are long and all start with a phone #. I would like to when i am importing the csv file to parse just the phone # out of the string and save it to a $variable

    heres what it looks like

    $names = ipcsv "C:\Users\Administrator\Desktop\qa.csv" 
    9176727356 by @ 11_16_28 AM.wav               
    3057412828 by @ 10_25_07 AM.wav                    
    5618959714 by @ 2_57_49 PM.wav  
    i solved it thanks 
    $names  | foreach {$,10)}
  • #18425

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Thanks for posting the answer 😉

The topic ‘Import-csv SubString in the pipeline’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort