imap_copy icon indicating copy to clipboard operation
imap_copy copied to clipboard

Recursive folder copy.

Open ghost opened this issue 12 years ago • 6 comments

Is it possible to copy a folder recursively?

ghost avatar Aug 27 '13 12:08 ghost

Hi, Id be really happy to see this functionality too! :-)

Nice script though..

drjnet avatar Apr 09 '15 10:04 drjnet

I tried doing it in my fork. Seems to be working fine.

Michał Margula, [email protected], http://alchemyx.uznam.net.pl/ "W życiu piękne są tylko chwile" [Ryszard Riedel]

Dnia 9 kwi 2015 o godz. 12:36 drjnet [email protected] napisał(a):

Hi, Id be really happy to see this functionality too! :-)

Nice script though..

— Reply to this email directly or view it on GitHub.

alchemyx avatar Apr 09 '15 10:04 alchemyx

Hi, Is there some switch i need to run it recursively as I couldnt see anything in code? I just downloaded the main zip from githib are you using something different?

drjnet avatar Apr 09 '15 10:04 drjnet

https://github.com/jarus/imap_copy/pull/8/files?short_path=88b99bb

Michał Margula, [email protected], http://alchemyx.uznam.net.pl/ "W życiu piękne są tylko chwile" [Ryszard Riedel]

Dnia 9 kwi 2015 o godz. 12:51 drjnet [email protected] napisał(a):

Hi, Is there some switch i need to run it recursively as I couldnt see anything in code? I just downloaded the main zip from githib are you using something different?

— Reply to this email directly or view it on GitHub.

alchemyx avatar Apr 09 '15 11:04 alchemyx

Perfect thanks, this may be due to the fact the account im testing with has oer 300 sub folders but i get this error:

2015-04-09 12:37:27,493 - INFO - Connect to source (secure.emailsrvr.com) 2015-04-09 12:37:27,914 - INFO - Authenticate at source 2015-04-09 12:37:28,313 - INFO - source connection established 2015-04-09 12:37:28,675 - INFO - Connect to destination (mail3.gridhost.co.uk) 2015-04-09 12:37:28,900 - INFO - Authenticate at destination 2015-04-09 12:37:28,928 - INFO - destination connection established 2015-04-09 12:37:29,477 - INFO - Getting list of mailboxes under Inbox 2015-04-09 12:37:29,834 - INFO - Disconnect from source server 2015-04-09 12:37:29,959 - INFO - Disconnect from destination server Traceback (most recent call last): File "imapcopy-fork.py", line 261, in main() File "imapcopy-fork.py", line 255, in main imap_copy.run() File "imapcopy-fork.py", line 174, in run self.copy(source_mailbox, destination_mailbox, self.skip, self.limit) File "imapcopy-fork.py", line 99, in copy new_source_mailbox = d.split('"')[3] # Getting submailbox name IndexError: list index out of range

drjnet avatar Apr 09 '15 11:04 drjnet

I think block is 2, in my example I have d element equal to: '(\HasNoChildren) "/" INBOX/origine/prova' so splitting this string generate 3 elements '(\HasNoChildren)', '/', 'INBOX/origine/prova' the block for destination folder is [2]

... but seems doesn't call recursion (maybe == recurse_level is != in the next if block?)

nicothebrush avatar May 10 '16 13:05 nicothebrush