Import-csv SubString in the pipeline

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 3 years, 6 months ago.

  • Author
  • #18398

    H Man

    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

    Don Jones

    Thanks for posting the answer 😉

You must be logged in to reply to this topic.