简体   繁体   中英

GAS: Save file in folder

GAS: I succesfully created a file with DocumentApp.create and saved it in my Drive root using saveAndClose(). What I'm trying to do is to save the file in MyFolder that exists in Drive root.

I am able to create a file in this folder using createFile() but I'd like to create it using DocumentApp.create, so that I can format the text. Is this possible somehow? If not is it possible to copy a file from root to MyFolder?

您可以使用File.addToFolder()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM