I want to copy folders into a Master Folder within Google Drive. My main issue is creating a function when one column is not blank and another column is blank. Once, a new folder is created it has to paste in the folder URL in one of the columns.
This is what I have so far:
function addData(){
var activeSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data");
var lr = activeSheet.getLastRow();
var lc = activeSheet.getLastColumn();
var sourceData = sourceSheet.getRange(1, 1, lr, lc).getValues();
for (row in sourceData) {
if (sourceData[row][0] !== "" && sourceData[row][19] !== "") {
var rowNum = parseInt(row);
//code will go here for Folder copying and renaming and getting the new folder url
activeSheet.getRange(rowNum+1,lc).setValue("Completed"); //we will eventually change Completed with the new Folder URL
}
}
}
I'm stuck with my coding on automating folder creation in Google Drive. I want to copy one folder to the next all within Google Drive. My main issue is creating a function when column A is not blank and column S is blank. Once, the new folder is created it pastes in the folder URL in column S.
. I apologize for this. Can I ask you about the detail of your current issue and your goal? – TanaikeI want to copy folders into a Master Folder within Google Drive.
is correct. I have one more question. I cannot understand the relationship betweenI want to copy folders into a Master Folder within Google Drive.
andMy main issue is creating a function when one column is not blank and another column is blank. Once, a new folder is created it has to paste in the folder URL in one of the columns.
. I apologize for this. Can I ask you about the detail of your goal? – Tanaike