SHARE
TWEET

Untitled

a guest Jul 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Create a text file
  2. function example11() {
  3.   DriveApp.createFile("EXAMPLE 11 FILE", "This is a new file");
  4. }
  5.  
  6. //Create a PDF
  7. function example12() {
  8.   DriveApp.createFile("EXAMPLE 12 PDF FILE",
  9.                       "This is a new PDF file", MimeType.PDF);
  10. }
  11.  
  12. //Create a new folder
  13. function example13() {
  14.   DriveApp.createFolder("EXAMPLE 13 FOLDER");
  15. }
  16.  
  17. //Create PDF with HTML
  18. function example14() {
  19.   DriveApp.createFile("EXAMPLE 14 HTML PDF FILE",
  20.                       "<h1>This is a new <em>PDF</em> file</h1>",
  21.                       MimeType.PDF);
  22. }
  23.  
  24. //Create multiple PDF files
  25. function example15() {
  26.   for(d=1;d<6;d+1){
  27.     DriveApp.createFile("EXAMPLE 15 PDF FILE "+d,
  28.                         "This is file number "+d, MimeType.PDF);
  29.   }
  30. }
  31.  
  32. //Create multiple folders
  33. function example16() {
  34.   for(f=1;f<6;f++){
  35.     DriveApp.createFolder("EXAMPLE 16 FOLDER NUMBER "+f);
  36.   }
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top