19 lines
354 B
Python
19 lines
354 B
Python
"""
|
|
Renombrar todos los archivos del directorio ./test/
|
|
"""
|
|
|
|
import os
|
|
|
|
def main():
|
|
i = 0
|
|
path = './test/'
|
|
for filename in os.listdir(path):
|
|
my_dest = 'renom_' + str(i)
|
|
my_source = path + filename
|
|
my_dest = path + my_dest
|
|
os.rename(my_source, my_dest)
|
|
i += 1
|
|
|
|
if __name__ == '__main__':
|
|
main()
|