Skip to main content
Participant
October 23, 2024
Question

Shortening multiples different names of files for google drive

  • October 23, 2024
  • 1 reply
  • 334 views

I have so many pdfs that I can't open in google drive because the file / folder's names are too many characters. After searching it seems that the limit is 255 including the folder path. So the deeper in - the shorter the file name needs to be. Some of my folders have hundreds of pdfs.

Probably more of a google drive question than adobe - but does anyone know how to shorten the name of a bunch of folders with all different names? Likely not possible... But some clever person on here may know...

1 reply

S_S
Community Manager
Community Manager
February 18, 2025

Hi @,

 

Hope you are doing well. Thanks for writing in!

 

In case you are still looking for a solution, you can try the below steps:

PowerShell Script (Windows)

You can run a PowerShell script to rename folders and files in bulk. Here's a simple script to shorten folder names:

  1. Open PowerShell as Administrator.

  2. Run this command (it trims all folder names to the first 20 characters, but you can adjust):

  3. Get-ChildItem -Directory -Recurse | Rename-Item -NewName { $_.Name.Substring(0, [Math]::Min(20, $_.Name.Length)) }
  4. If you need to shorten file names as well:
  5. Get-ChildItem -File -Recurse | Rename-Item -NewName { $_.Name.Substring(0, [Math]::Min(20, $_.Name.Length)) + $_.Extension }

macOS Automator

For Mac users, you can use Automator to:

  • Create a "Rename Finder Items" action to batch rename files and folders.
  • Select "Truncate" to trim names down to a shorter length.

Hope this helps.


-Souvik