10 lines
253 B
Python
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)
|