function copyFolderContents_(source, target) {
// Iterate files in source folder
const filesIterator = source.getFiles()
while (filesIterator.hasNext()) {
const file = filesIterator.next()
// Make a copy of the file keeping the same name
file.makeCopy(file.getName(), target) // need to find python function replacing THIS LINE!!!!!!!!!!!!!!!!!!
}
}
const toCopy = DriveApp.getFolderById('')
const copyInto = DriveApp.getFolderById('')
const newFolder = copyInto.createFolder(toCopy.getName())
copyFolderContents_(toCopy, newFolder)
I trying to rewrite this app script into python, which only copies the file but not the folder into another locatioN
is there any pydrive or vanilla HTTP restful API that could replace file.makeCopy(file.getName(), target) ?
After visiting ref , seems this restful API doesn't have a target that I could specified.





