This script reads a file produced from the command:
xemacs -batch -vanilla -f list-load-path-shadows
Note you must edit the output to remove the crud at the beginning and
end. Then run this script with that file as stdin:
#!/usr/bin/python2
import sys
import string
import os
def move (file):
if (os.path.exists (file)):
print file
os.rename (file, file + ".duplicate")
for line in sys.stdin.readlines():
file = string.split (line)[0]
move (file + ".el")
move (file + ".elc")