equal
deleted
inserted
replaced
21 <list of directory content> |
21 <list of directory content> |
22 >>> ren('A01','A03') |
22 >>> ren('A01','A03') |
23 rename A010-joe.en.txt to A030-joe.en.txt |
23 rename A010-joe.en.txt to A030-joe.en.txt |
24 accept [y/N]? |
24 accept [y/N]? |
25 """ |
25 """ |
26 from __future__ import print_function |
|
27 |
|
28 |
26 |
29 def ren(a,b): |
27 def ren(a,b): |
30 names = glob.glob('%s*'%a) |
28 names = glob.glob('%s*'%a) |
31 for name in names : |
29 for name in names : |
32 print('rename %s to %s' % (name, name.replace(a,b))) |
30 print('rename %s to %s' % (name, name.replace(a,b))) |