Make noext, ext from the file basename instead of whole path.
This commit is contained in:
parent
f40f41b62a
commit
514af31c18
1 changed files with 1 additions and 1 deletions
|
@ -35,9 +35,9 @@ def brename(transformation, autoyes=False, recurse=False):
|
|||
|
||||
news = []
|
||||
for (index, x) in enumerate(olds):
|
||||
(noext, ext) = os.path.splitext(x)
|
||||
directory = os.path.dirname(x)
|
||||
basename = os.path.basename(x)
|
||||
(noext, ext) = os.path.splitext(basename)
|
||||
x = basename
|
||||
x = eval(transformation)
|
||||
x = os.path.join(directory, x)
|
||||
|
|
Loading…
Reference in a new issue