Publisher review:Rename subdirectories of a directory tree script walks into a directory tree and renames certain subdirectories. I needed to write a sed/awk Python equivalent for walking into a directory tree and renaming certain subdirectories, while also looking into all xml files on the way and replacing/modifying certain strings in those files.It would be nicer if someone could suggest an enhanced re.sub(regex, replacement, subject) where I could replace all strings of a certain pattern with other strings of a certain pattern i.e. the second argument in re.sub namely 'replacement' would then be a regular expression and would be a different string for each different string in 'subject' that matches with the pattern 'regex'. For example 'arthinternational-d' would be replaced by 'arthinternational-r', 'arthfmt-d' would be replaced by 'arthfmt-r' but 'a-d' would remain unmodified.
Rename subdirectories of a directory tree is a Python script for File Management scripts design by B T.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Rename subdirectories of a directory tree script walks into a directory tree and renames certain subdirectories.
Operating system:Windows / Linux / Mac OS / BSD / Solaris