Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to duplicate an entire folder on my Google Drive once a week. There are about 25 files in the folder. What is an easy way to do this?

share|improve this question
From the web interface I assume. This would be academic if you're using the client and syncing to a folder on your PC. – Al E. Feb 8 '13 at 3:04
are you wanting to just back the stuff up in that folder? or are you trying to add it to another google account? Do you need the entire contents of the folder or will just the pointers do? – William Feb 8 '13 at 20:24
I needed to duplicate it because I want to have different permissions on them, for this, I need to have separated environments. But using google drive for PC worked fine! – Dude2012 Feb 27 '13 at 20:13
up vote 11 down vote accepted

If you are using the Google Drive application on your PC you can copy and paste the folder in the Google Drive directory, and this would copy it. I do not believe it is possible to do this from the web application.

share|improve this answer
That worked just fine! Thanks! – Dude2012 Feb 27 '13 at 20:13
Unfortunately for Linux users, till today Google doesn't have support for "Google Drive Application". Hence they need to use something called "grive" – iammilind Apr 9 '14 at 5:00
Will it re-upload the entire new folder to the web, or does it know that the contents of the folder are identical and it duplicates it without a full re-upload? – Julian Aug 1 '14 at 16:23
@Julian I would assume that it reuploads the whole thing. – ComputerLocus Aug 1 '14 at 17:42
I just confirmed that it indeed reuploads all files. Bummer. – Julian Aug 2 '14 at 5:22

Have written an App Script just to address this problem. You can copy any folder contents as well as the structure in it. Script will help eliminate the need of Google Drive desktop app. By adding triggers you can even automate the process.

GDrive Copy Folder Structure/Content Script

Copy Folder Structure in Google Drive

share|improve this answer
Super cool feature, worked perfectly even for very big folders with hundreds of sub-folders and thousands of files (some were extra large). Thank you Shunmugh! – kubusz Aug 18 '15 at 13:41
also adds suffix "_copy" to all the subfolders, yikes! – manas Feb 11 at 20:21

If you are in the Google Drive web interface...

  1. Create a new folder and name it what you want.

  2. Go into the Pre-existing folder, select all the files, right click and hit copy.

  3. Select all the copies, right click and hit move to. Select the New Folder.

Note that this method will not work if the folder you wish to copy has subfolders.

share|improve this answer

I use multiple machines and don't want to put the drive app on all of them so I have written the below script to copy on the site. It’s ugly and basic but it works. It only copies a folder and its files, not sub folders. I am sure there is room for improvement, so feel free to take this and improve it, but I hope it’s at least helpful from the start.

Per a comment below, this is a Google Apps Script. The way to use it is to open the Google scripting app, then copy and past all of the code into a blank script. After that click the publish option on the Menu, then select deploy as web app. You can then click the Latest code link or copy and paste the URL into your browser. Then, you will find a box where you can type the folder that you want to copy, and the copy button. That should create a copy of the folder you have named, and a copy of all of the files within.

Note: it will not copy sub-folders, just the files.

function doGet()
  // Build UI
  // Create UI object
  var copyUI = UiApp.createApplication();
  // Create Input box referenced later by the name explicitly set below
  var userInput = copyUI.createTextBox().setName("textbox1");
  //create button
  var enterButton = copyUI.createButton("copy");
  // add all objects to UI object

  //Create clicke event handeler and add input field to handeler
  var clickHandler = copyUI.createServerHandler('onClick')

  // add handelrer to the copy button

  // instantiate GUI
  return copyUI;

function onClick(e)
  // call currently active application/gui
  var app = UiApp.getActiveApplication();

  //Pass in the value of the e paramater named 'textbox1'
  var input = e.parameter.textbox1;

  // log value passed in from user input

  // perform file copy

function CopyFile(filename)
  // declaire variables
  var newFolder_String;
  var newFolder;
  var originalFolder;
  var fileArray;
  var loopCount;
  var arrayLength;
  var newFile;
  // get original folder id
  originalFolder = DocsList.getFolder(filename);

  // create new "copy" folder using: createFolder(<filename>_copy)
  newFolder_String = filename + "_Copy";
  newFolder = DocsList.createFolder(newFolder_String);

  // get folders and files from original file using: 
    //   getFiles() from original file into an array
  fileArray = originalFolder.getFiles();

  // Copy files into folder:
  arrayLength = fileArray.length;
  loopCount = 0;

  // looping through array of file
  for (loopCount = 0; loopCount < arrayLength; loopCount++)
    // create file copies using: file[i].makeCopy() and newFile.addToFolder(CopyFolder)
    newFile = fileArray[loopCount].makeCopy();

share|improve this answer
I'm guessing this is a Google Apps Script, but that may not be obvious to the OP or other readers. Could you clarify that in your answer, and perhaps add instructions on how to install and run your script? – Vidar S. Ramdal Feb 24 '14 at 12:11

You can use the "Copy Folder" add-on for Google Spreadsheets:

  1. create a Google Spreadsheet
  2. click on Add-ons > Get add-ons and add the 'Copy Folder' add-on`
  3. select the folder you want to copy
  4. done

See the video tutorial.

share|improve this answer

To duplicate a folder drag & drop it on another folder holding CTRL button.

share|improve this answer
That doesn't duplicate; it just creates a pointer. I tested this by doing the Ctrl-drag-n-drop of a folder to a couple of different places, then created a file in the folder, and the file is visible in every place. – Al E. Feb 8 '13 at 19:45
That's right. They call it "adding a folder" – th3an0maly Jul 16 '13 at 23:33
-1, doesn't work. – Pacerier Oct 31 '14 at 9:22

This is a very good Google Script Macros app: https://script.google.com/macros/s/AKfycbxbGNGajrxv-HbX2sVY2OTu7yj9VvxlOMOeQblZFuq7rYm7uyo/exec

with real time logs and folder selector.

share|improve this answer
Adding essential part of the link into answer would be more helpful. – serenesat Jun 8 at 9:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.