I have files in google drive in upper case, I want to rename them all to lower case
Example :
ZVXDA0002-ZPOILTY024(full).xml should be renamed as zvxda002-zpoilty024(full).xml
here is the script I tried
function FileRenaming() {
var SourceFolder = DriveApp.getFolderById("Test_rename")
var Files = SourceFolder.getFiles();
while(Files.hasNext()) {
var file = Files.next();
var FileRename = file.makeCopy(file.getName());
var DestinationFolder = DriveApp.getFolderById("Test_renameD")
DestinationFolder.addFile(FileRename);
SourceFolder.removeFile(file);
}
}
returns
Exception: Unexpected error while getting the method or property getFolderById on object DriveApp. (line 2, file "Code")Dismiss