Python: Rename existing dir?

Started by
0 comments, last by OrangyTang 19 years, 10 months ago
Anyone know how to rename an existing dir with Python (on WinXP if that matters)? The os.rename(old, new) only works on files, for some reason the docs state that it doesn''t work on directories. I suppose I could just create a new dir and copy the files across, but that seems like more effort than it should be. Google just points me at the same rename function as well.
Advertisement
shutil.move
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement