MCPcopy Create free account
hub / github.com/ActiveState/code / lower_names

Function lower_names

recipes/Python/226409_dirlower/recipe-226409.py:4–8  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

2import shutil
3
4def lower_names(dir):
5 assert(os.path.isdir(dir))
6 [os.rename( os.path.join( dir, file ),
7 os.path.join( dir, file.lower() ))
8 for file in os.listdir(dir)]
9def get_dir():
10 input = raw_input('Enter Directory Name: ')
11 return input

Callers 1

recipe-226409.pyFile · 0.85

Calls 5

isdirMethod · 0.80
renameMethod · 0.45
joinMethod · 0.45
lowerMethod · 0.45
listdirMethod · 0.45

Tested by

no test coverage detected