@@ -0,0 +1,602 @@
+import arcpy, os%0A%0A#walk through all subdirectories and change mxd to store relative paths%0A%0Afor root, dirs, files in os.walk(r%22Q:%5CGeodata%5Cshape%22):%0A        for f in files:%0A            if f.endswith(%22.mxd%22):%0A                filepath = root + '%5C%5C' + f%0A                print filepath%0A                try:%0A                    mxd = arcpy.mapping.MapDocument(filepath)%0A                    #set relative paths property%0A                    mxd.relativePaths = True%0A                    mxd.save()%0A                except:%0A                    print filepath + ' failed'%0A                    pass%0A%0A                %0A%0A

Create MakeRelativePaths.py