omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    How can I transfer folder from Ver 3 to Ver 2

    Pythonista
    2
    2
    1420
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dnino99
      dnino99 last edited by

      I have version 2 and version 3 of Pythonista running on XS MAX 12.2. I have mistakenly moved a folder from version 2 (Pythonista Documents) to version 3. I wish to restore the folder and its contents back to version 2 (Pythonista Documents). Is there a method I can use to move the entire folder and its contents back to version 2 (Pythonista Documents) other than copy/paste individual files ? Thank you in advance for any help with this.

      1 Reply Last reply Reply Quote 0
      • dgelessus
        dgelessus last edited by

        You can use the following commands in the Pythonista 3 Python console to copy the folder back:

        >>> import os, shutil
        >>> shutil.copytree(os.path.expanduser("~/Documents/foldername"), os.path.expanduser("~/../Documents/foldername"))
        

        where foldername is the name of the folder you want to copy (assuming that it's in the root of Pythonista 3's local files). You can also use shutil.move instead of shutil.copytree if you want to move the folder rather than copy it (which may be a good idea if it's very big).

        By the way, is there any reason in particular why you're still using Pythonista 2? Pythonista 3 supports both Python 2 and 3, so there's generally no need for Pythonista 2 if you have Pythonista 3. In fact Pythonista 2 can no longer be bought on the App Store and won't receive any more updates.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Powered by NodeBB Forums | Contributors