Skip to main content
GameDev.net gamedev.net
🔒 Locked

Python: Rename existing dir?

Started by OrangyTang Jun 6, 2004 at 5:58 PM 0 replies 300+ views
Original Post
OrangyTang
OrangyTang
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.