Google script DocsList service query string not working -


i'm making little script automatically organize autogenerated spreadsheets. goal archive spreadsheets in directory based on name (all of them start same name end in pattern i'm using organize them). problem have function:

lstfile = docslist.find('type:spreadsheet title:"prog_gral_centre"'); 

the function doesn't have query options specified in the docs, i'm using on script , working fine! i've tried putting only:

lstfile = docslist.find('prog_gral_centre'); 

which should find 200 documents, none found! actually, if type prog_gral_centre search box of google drive, documents found, don't know what's wrong search filter.

any thoughts?

the method find(query) looks string in file content, not on file name... it worked (meaning without issue mentioned) i'm not sure solution use case since there risk filename found inside doc name (as reference example...).

why don't try getting filenames in array , search array instead ? can done , bring elegant solution problem wouldn't ?

i'm working on same type of script right ;-) here part gets files (just example if ever interested):

var doclist=docslist.getrootfolder().getfilesbytype("document",0,2000); var names = new array();   (nn=0;nn<doclist.length;++nn){     if(doclist[nn].getname().match("impression_")=="impression_"){   names.push([doclist[nn].getname(),doclist[nn].getid()]);   }   } 

after sort array way want , show result in list ui.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -