Steps to export a folder from command line where folder name contains white spaces
How to export a folder from command line when folder name contains white spaces
Problem
Folder export fails when folder name has white spaces and generates "no such item" error as below -
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//Communications Officer Recruitment?fmt=zip' > /tmp/test.zip ERROR: service.FAILURE (system failure: GET from https://MAIL.DOMAIN.COM/home/USERNAME@DOMAIN.COM//Communications%20Officer%20Recruitment?fmt=zip failed, status=404. no such item)
Solution
Use the given commands to export a folder which has white spaces in it's name -
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=in:"Communications Officer Recruitment"' > /tmp/test1.zip
OR
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=under:"Communications Officer Recruitment"' > /tmp/test2.zip
Note:-
- If the query is [ in: ] , then only selected folder will export.
- If the query is [ under: ] , then selected folder and sub-folders will export.
Submitted by: Heera Singh Koranga |