else/Toolbox/breplace.py
Ethan Dalool 97403c7d5f else
2016-12-04 17:50:52 -08:00

10 lines
253 B
Python

'''
Batch rename files by replacing the first argument with the second.
'''
import brename
import sys
replace_from = sys.argv[1]
replace_to = sys.argv[2]
command = 'x.replace("{f}", "{t}")'.format(f=replace_from, t=replace_to)
brename.brename(command)