Why not use an external application like
DMEXMenu (free) or the inexpensive ($15 USD)
Better File Rename ? Neither of which takes more than 10 seconds when changing the names of over 10,000 files on my computer (thus no noticable freeze/lockup). The latter will change folder names, as well as sub folders and files.