We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8845df2 commit 0d4a890Copy full SHA for 0d4a890
batch_file_rename.py
@@ -60,11 +60,11 @@ def main():
60
work_dir = args['work_dir'][0]
61
# Set the variable old_ext with the second argument passed
62
old_ext = args['old_ext'][0]
63
- if old_ext[0] != '.':
+ if old_ext and old_ext[0] != '.':
64
old_ext = '.' + old_ext
65
# Set the variable new_ext with the third argument passed
66
new_ext = args['new_ext'][0]
67
- if new_ext[0] != '.':
+ if new_ext and new_ext[0] != '.':
68
new_ext = '.' + new_ext
69
70
batch_rename(work_dir, old_ext, new_ext)
0 commit comments