Rename subdirectories of a directory tree

Rename subdirectories of a directory tree

Rename subdirectories of a directory tree Download Summary

  • Language: Python
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • License: Other Free / Open Source License - Python License
  • Databases: N/A
  • Downloads: 357
  • Released: Jun 6, 2007

Rename subdirectories of a directory tree Description

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 Keywords

Rename subdirectories of a directory tree Bookmark

Hyperlink code:
Hyperlink for Forum code:

Rename subdirectories of a directory tree Script Download Notice

Top 4 Download periodically updates information of Rename subdirectories of a directory tree script from the developer, but some information may be slightly out-of-date.

Our script download links are directly from our mirrors or publisher's website. Rename subdirectories of a directory tree torrent files or shared files from free file sharing and free upload services, including Rapidshare, MegaUpload, YouSendIt, MailBigFile, DropSend, HellShare, HotFile, FileServe, MediaMax, zUpload, MyOtherDrive, SendSpace, DepositFiles, Letitbit, LeapFile, DivShare or MediaFire, are not allowed!

Watching a directory tree on Unix

This script continuously monitors the paths and their subdirectories for changes. If any files or directories are modified, the callable 'func' is ... a list of the modified paths of both files and directories.'func' can return a Boolean value for rescanning; if it returns True, the directory tree will be rescanned without calling func() for any ...
Python

FileManager

Use this software to manage files and directories on your webserver or on an FTP server. You can create, rename and delete directories, upload, download, edit, rename and delete files, and change file and directory permissions.FileManager works fine with FTP connections. Please note ... this case it can only access directories and files for which PHP has at least read permission; ...

Swap one file extension

This script will swap extensions on all files in the specified directory, and all of its subdirectories, and all of their subdirectories, etc. This is useful for changing the extensions of a whole batch of files in a folder structure, e.g. a web site. ... correcting errors made when saving a batch of files programatically. ...
Python

PHPFile Manager

phpFileManager is a complete filesystem management tool on a single file. Features: server info, directory tree, copy/move/delete/create/rename/edit/view/chmod files and folders, tar/zip/bzip/gzip, multiple uploads, shell/exec, works on linux/windows. ...

Tree

The following program displays the directory structure of a specified path using ASCII characters. The program can optionally display files in addition to directories.This program functions similar to the windows 'tree' command. ...
Python