proggybilly
Programmer
I am planning a migration from an old email server to a more up to date server. I need to migrate the users for each domain I host for, which is no problem cause I can tar the directory and sftp that tar file to the new server. The problem lies with needing to move directories around in the user accounts. Right now the directory structure looks like
I am trying to figure out how to setup a script that will move into each user directory and move the Maildir/mailboxes up one level so directory now looks like:
So basically a script that will move all directories under Maildir up one level. I want this to be a perl script but since I have very little experience with perl I thought I'd come here to see if someone can get me started. I really just need to know how to tell perl to go into each user directory, then I can tell it to run a command to move the files.
Code:
domain/user/Maildir/mailboxes
I am trying to figure out how to setup a script that will move into each user directory and move the Maildir/mailboxes up one level so directory now looks like:
Code:
domain/user/mailboxes
So basically a script that will move all directories under Maildir up one level. I want this to be a perl script but since I have very little experience with perl I thought I'd come here to see if someone can get me started. I really just need to know how to tell perl to go into each user directory, then I can tell it to run a command to move the files.