Checking for long folder and file paths with "Path Length Checker" tool.

Summary

A tool to scan a computer directory, and enumerate the files present and their path length from the chosen starting root folder.
This may assist in migrating from Box to OneDrive/Teams.

Body

Overview

As Ohio State migrates from Box to OneDrive and Teams (or Sharepoint), one of the larger concerns is the risk of file and folder path length. While Box allowed very long paths, there is a limitation on OneDrive/Teams of 400 characters or less.

Using this path checker tool can make your migration go smoother.

OTDI will migrate your files into your individual OneDrive or a Team, depending if the files are in a unit folder or not. their tool will come back asking you to shorten paths, if necessary, but being informed beforehand can make it smoother. If you do choose to migrate on your own, please remove the old Box files so OTDI doesn't need to migrate them. 

More information from Microsoft about invalid file names, types, and other limitations: Invalid file names and file types in OneDrive and SharePoint - Office Support (microsoft.com), and also see the Teams and OneDrive Introduction in the related articles section.

Contents

  • Prerequisites
  • Path Length Check GUI tool
    • Downloading
    • Usage
    • Remediation

Prerequisites

  • This tool does not require an install or admin access to run, as long as you can read the file source.
  • Must have permissions to the Box or network drive folder at the highest level needed for any specific OneDrive/Team migration.
    • i.e. something like “Physics Administration” may contain something like “Physics Financials”.
    • So which one we choose to examine, depends on where we consider in the hierarchy the place to ‘start counting’ for length.
  • Must be running on a Windows computer.
    • The tool has not been tested or compiled for any other OS.
  • Must be logged in to Box Drive on the computer running the tool. (Assuming source is Box.)

One possible tool: Path Length Checker GUI

Note, this is not an OTDI approved tool, and OTDI will do the migration if you wish. However, ASCTech has found this tool useful and want our users aware of it.

If you need assistance reach out to ASCTech.

This is one possible tool which can be used to scan a computer directory, and enumerate the files present and their path length from the chosen starting root folder. While this is seemingly intended for local storage paths, it seems to work when pointed to folders mounted via Box Drive.

Here's the Path Length Checker GUI app documentation:

GitHub - deadlydog/PathLengthChecker: Path Length Checker is a stand-alone app that returns the paths and length of all files and directories in a given directory.

Downloading

A ZIP file can be downloaded from the releases page: Releases · deadlydog/PathLengthChecker · GitHub

Unzip that and find the GUI executable, looks like this:

(NOTE: Right now, Symantec seems to throw a false positive on this as of the latest version 1.8.2, though this was not the case with version 1.6.0. It claims "WS.Reputation!" because it's an obscure app with small sample size. But it's open source so that can be scrutinized by anyone who cares.)

Usage

Run the app and you'll see something like this:

To examine the directory structure, simply choose your starting directory path (click the "..." top right and browse to select)

Optionally, you can limit the results to only report overly-long file paths by choosing something like 400 for min path length value.

We do not recommend using the "search pattern" or "replace" options. Ignore those for the time being. Whenever you use an automated tool to make changes, large mistakes are possible. We recommend shortening the paths indvidiaully.

Click "Get Path Lengths" and then wait. It may take some time depending on how large of a folder you're searching. There is no progress bar or status updates until it finishes. For example, a "very long" directory on Box Drive may take 45 minutes. A very small folder on local computer would be nearly instantaneous.

Once you get some results, it may look like this:

And you can sort those results by clicking the "Length" column title. You can also copy the paths to your clipboard or export them into a CSV.

Note that in these results, the shortest path is still 47 chars. That is the full length of the shortest file name at the root of my folder, in this case: "C:\Users\canale.6\Box\Office Materials\test.pdf". Therefore if you want to be precise in character count, you need to consider the length of your root folder and subtract that value. BECAUSE the destination path in teams/sharepoint WILL NOT reflect the c:\users... part. It will start counting at "Office Materials".

Remediation

Armed with this information you can now move directories into higher level folders or shorten paths manually.

Hope this helps!

Details

Details

Article ID: 122342
Created
Wed 12/9/20 1:03 PM
Modified
Sun 3/31/24 2:05 PM

Related Articles

Related Articles (1)

This article is a short overview of Microsoft Teams. Teams has team chat, messaging, meetings, calling, to do lists, and file storage features.