Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive folder copy. #2

Open
ghost opened this issue Aug 27, 2013 · 6 comments
Open

Recursive folder copy. #2

ghost opened this issue Aug 27, 2013 · 6 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2013

Is it possible to copy a folder recursively?

@drjnet
Copy link

drjnet commented Apr 9, 2015

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

Nice script though..

@alchemyx
Copy link

alchemyx commented Apr 9, 2015

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

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

Dnia 9 kwi 2015 o godz. 12:36 drjnet notifications@github.com 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.

@drjnet
Copy link

drjnet commented Apr 9, 2015

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?

@alchemyx
Copy link

alchemyx commented Apr 9, 2015

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

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

Dnia 9 kwi 2015 o godz. 12:51 drjnet notifications@github.com 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.

@drjnet
Copy link

drjnet commented Apr 9, 2015

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

@nicothebrush
Copy link

nicothebrush commented May 10, 2016

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@nicothebrush @alchemyx @drjnet and others