Google Drive usually doesnt allow you to copy folders within the drive. But there are a few workarounds that you can try.
- If you have Google Drive Sync up with your computer i.e. if you have a Google Drive folder, you can definitely use simply Ctrl+C and Ctrl+V to copy folders.
- But if you are like me that doesnt want to sync everything with your computer, you may have to follow the following steps:
First create a google colab file using New Button on top left. If you cannot see the Google Colaboratory in the menu, Click Connect more apps and then search for Google Colaboratory and connect. Then open a colab file.
Then open the currently created file and connect to a runtime server using connect button on right.
Once it is connected, connect to Drive using the button as shown below.
Then navigate to your file and click on 3 dots on right of your folder. Then click on Copy Path.
Once you have copied path, head to the top field and write following command
!cp -R <source_folder> <destination_folder>
It is important to note that folders will always have /content/drive/MyDrive/… in start of them. So make sure you add that in destination folder link as well. Don’t forget to rename destination folder the way you like. Run the command using play button on left and if everything is done right, it will simply run without errors or any prompts.
Refresh the left tab and see if your folder and files appeared in the folder!