For example:
\\servername\f$\username\pstfilename
\\servername\sharename\pstfilename
\\servername\username$\pstfilename
i just need to keep the file path containing username$, therefore can
anyone suggest a way to loop through the CSV file searching for
'sharename' or admin share (i.e. f$) and remove the line that contains
it? By default the username$ lines will not be removed as i'll never
be searching for those strings.
Any and all help appreciated, thanks
sherlock
PS > cat report.txt
\\servername\f$\username\pstfilename
\\servername\sharename\pstfilename
\\servername\username$\pstfilename
PS > cat report.txt | where { $_ -notlike "*f$*" -and $_ -notlike
"*sharename*" }
\\servername\username$\pstfilename
Hope this helps,
Matt
Thanks loads!
sherlock