Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell - Trimming the first 10 characters from a text file and replacing it

$
0
0

Hi Everyone,

Does anyone know how to trim the first 10 characters from a text file and then append the replacement in its place?

Example: Lets say that on the first line of text which could be a random name like this  \\server1234\sharedfolder. I want to replace \\server1234 with \\server5678. Remember that trimming is my only alternative because there is no static name, its random.

Any help would be very helpful. Thank you


Viewing all articles
Browse latest Browse all 15028

Trending Articles