How can I transfer folder from Ver 3 to Ver 2
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.
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"))
foldernameis 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.copytreeif 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.