Limit on bulk commands?

86 views
Skip to first unread message

Brandon Glaser

unread,
May 1, 2014, 12:08:54 PM5/1/14
to google-ap...@googlegroups.com
I'm attempting to create a large number of folders for a single user, based off a txt file that runs fine for 5-10 folders, then it will just return "Error: invalid_request".  If I wait a couple minutes, and restart the batch file, the ones that failed previously will work but again I only get a handful of folders created until it errors out again.

#1: Is there a limit on how many commands can be processed per minute like this?

#2: Is there a good way to slow down my script so that it will not surpass this threshold?  The text list I'm pulling from is many hundreds long, so to have to watch this and constantly edit the list to remove successes is a large pain.

The script I'm working with looks something like this:
For /F "tokens=*" %%a in (c:\gam\info.txt) Do gam user [User email] add drivefile drivefilename "%%a" mimetype gfolder parentname "Parent"

Brandon Glaser

unread,
May 1, 2014, 12:57:11 PM5/1/14
to google-ap...@googlegroups.com
Well if anyone else runs into this, I at least found a decent way to slow down my script and it seems to be working decently sofar.

Changed the script to this.  the /T 30 makes it wait 30 seconds in between commands and can be increased/decreased as needed.
For /F "tokens=*" %%a in (c:\gam\info.txt) Do (
gam user [User email] add drivefile drivefilename "%%a" mimetype gfolder parentname "Parent"
choice /C X /T 30 /D X > nul )

Géza Fodor

unread,
May 17, 2014, 6:27:32 PM5/17/14
to google-ap...@googlegroups.com
Eh... I think, the complete GAM package must be reorganised. If I set up this wait paramter in a script to 10 sec, it will run in my case more than 46 days, if it not dies before. :(
Reply all
Reply to author
Forward
0 new messages