I would really appreciate some of you ESRI and Python experts to lend a hand to me on this subject. I have a number of folders that each contain countless layer files (.lyr). All of the layer files reference an old SDE db connection and the task at hand is to change them all to a new SDE connection using Python.
There seems to be a lot of forum submissions describing a similar requirement but not ending well due to some limitations with objects or python, or some combination thereof. I am hoping to get any insight at this point. A lot of examples involve changing the data connection prooperties of layers in a map (.mxd), but in my case, they are not managed this way...they're in file folders.
Something along the lines of:
for every layer file in a folder change the db connection from SDE1 to SDE2