Link to home
Start Free TrialLog in
Avatar of phdit
phdit

asked on

POwershell Script

Hi All,
I have a text file which contains many rows (1000's of lines) of the below.
BIB9407/002,\\89.1.1.133\HAGEMEYER\CDHM2140812\NE045673\00000001.pdf

I need to make it look like
BIB9407/002,CDHM2140812\NE045673\00000001.pdf

So remove everything after the first , upto CDHM

I can do this easily using find replace but I need to automate this

Any guidance on how to script this will be appreciated it does not have to be in Powershell it can be VB script/batch.

Regards

John Harris
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will the \\89.1.1.133\HAGEMEYER\ be the same for all lines in the file?

Will the CDHM be the same for all lines?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial