locked
command to get the file names from a txt file RRS feed

  • General discussion

  • Hi 

    I have a txt file with the complete list of files and folders from the share folder.I would lilke to use powershell to extract the folder names out of this 

    File names are which ends with .xxx or .xx (eg: abc.txt ,abc.pl etc )

    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2sea.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2sec.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2sem.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2sexp.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2six.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2spi.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2sms.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2sne.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2slk.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2srl.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2ss10.dll
    p:\Apps\Program Files\Common Files\2.0\bin\crdb_p2strk.dll
    p:\Apps\Program Files\Common Files\2.0
    p:\Apps\Reports\OPPCPT.FP
    p:\Apps\Reports\ORGTE.FP
    p:\Apps\Reports\OTH43.FP
    p:\Apps\Reports\

    I am expecting an output as below 

    p:\Apps\Program Files\Common Files\2.0\

    p:\Apps\Reports\

    -Sachin 


    • Moved by Bill_Stewart Thursday, July 14, 2016 3:32 PM Unanswerable drive-by question
    Wednesday, May 18, 2016 1:01 PM

All replies