2016-12-05 01:50:52 +00:00
|
|
|
'''
|
|
|
|
Batch rename files by replacing the first argument with the second.
|
|
|
|
'''
|
2016-12-02 06:37:07 +00:00
|
|
|
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)
|
2016-12-05 01:50:52 +00:00
|
|
|
brename.brename(command)
|