--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/CACrgDdrJrNEYW%3DfT7MXd0B2Cr9s0p5KAWDZXEejUmRGcHMob2g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Hi Mario Rossi — thanks for the detailed response. My requirement is slightly more specific based on my sheet structure.
Each row contains a main Google Drive folder link in column E.
Inside that folder there are multiple subfolders (e.g. Folder 1, Folder 2, Folder 3 … Folder 7, Others).I need the script to:
• Recursively scan the main folder
• Count files inside each specific subfolder category
• Put counts in columns F onward (Folder 1 → Folder 7 → Others)
• If files are added later, counts should update correctly
• Ignore trashed files
• Ignore shortcuts (count actual files only)
• Count all file types
• Work in batches (50 rows per run)
• Automatically continue until complete
• Remove trigger when finished
• Log progress for troubleshooting
• Provide stable counts (currently they change each run)
• Allow periodic updates (e.g. hourly) so counts stay updated when files changeFolder classification logic:
• If file is inside subfolder named "Folder 1" → count in column F
• If inside "Folder 2" → column G
• … up to Folder 7 so onSheet name: use the existing sheet (first tab is fine)
Approximate size: around 8k–10k files total (may grow later).
Main requirement: counts must be consistent and reliable. Currently I get different values on each run, so stability is very important.
The sample sheet I shared reflects the structure I need.
Thanks — looking forward to the script.
Hi Mario Rossi — thanks for the detailed response. My requirement is slightly more specific based on my sheet structure.
Each row contains a main Google Drive folder link in column E.
Inside that folder there are multiple subfolders (e.g. Folder 1, Folder 2, Folder 3 … Folder 7, Others).
I need the script to:
• Recursively scan the main folder
• Count files inside each specific subfolder category
• Put counts in columns F onward (Folder 1 → Folder 7 → Others)
• If files are added later, counts should update correctly Yes, include files from Google Shared Drives (I have access and permissions).
• Ignore trashed files
• Ignore shortcuts (count actual files only)
• Count all file types
• Work in batches (50 rows per run)
• Automatically continue until complete
• Remove trigger when finished
• Log progress for troubleshooting
• Provide stable counts (currently they change each run)
• Allow periodic updates (e.g. hourly) so counts stay updated when files changeFolder classification logic:
• If file is inside subfolder named "Folder 1" → count in column F
• If inside "Folder 2" → column G
• … up to Folder 7 so onSheet name: use the existing sheet (first tab is fine)
Approximate size: around 8k–10k files total (may grow later).
Main requirement: counts must be consistent and reliable. Currently I get different values on each run, so stability is very important.
The sample sheet I shared reflects the structure I need.
Thanks — looking forward to the script.