|
import os
|
|
import sys
|
|
|
|
def main():
|
|
|
|
for file in os.listdir(sys.argv[1]):
|
|
if file.startswith('www-bruce-juice-com-') or \
|
|
file.startswith('www-bruce-juice-com_'):
|
|
print '%s ---> %s' % (file, file[20:])
|
|
os.rename(file, file[20:])
|
|
elif file.startswith('www-bangtidy-net-') or \
|
|
file.startswith('www-bangtidy-net_'):
|
|
print '%s ---> %s' % (file, file[17:])
|
|
os.rename(file, file[17:])
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main())
|