Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Users

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-2010, 12:48 AM
zvi zvi is offline
Active Member
 
Posts: 25
Default Move entire contents of one folder to another

How can I move the entire contents of one email folder to another existing email folder. I know I can drag and drop 100 at a time but how can I automate it for the whole folder contents?

Thanks

Zvi
Reply With Quote
  #2 (permalink)  
Old 03-12-2010, 07:36 AM
Trained Alumni
 
Posts: 70
Default

If you are asking from a user perspective, I think that moving by group is pretty much the only way to do it. From an administrative/console side, you have some scripting options you can do with zmmailbox and zmmboxsearch.

You can dump the contents of a folder to a directory with something like:
Quote:
zmmboxsearch -m username@domain.tld -q "in:foldername" -d /tmp/username
and then loop through that directory, importing each file into the new folder with something like:
Quote:
for x in '/tmp/username/*'
do
zmmailbox -z -m username@domain.tld am "/Zimbra/Destination Folder" $x
done
And finally remove the old folder with
Quote:
zmmailbox -z -m usernaem@domain.tld df "/Path/To/Original Folder"
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.