• Donate
    TheWindowsForum.com needs donations to stay online!
    Love TheWindowsForum.com? Then help keep it alive by sending a donation!

copy long path files to Onedrive for business

WELCOME TO THEWINDOWSFORUM COMMUNITY!

Our community has more than 63,000 registered members, and we'd love to have you as a member. Join us and take part in our unbiased discussions among people of all different backgrounds about Windows OS, Software, Hardware and more.

xcdscw

New Member
Jul 8, 2023
4
2
I'm trying to copy some files to OneDrive for Business, but I keep getting errors about file paths being too long. many of the files have long names or are nested deep within several subdirectories, and I'm not sure how to fix this issue. Is there a way to copy files with long paths to OneDrive for Business, or do I need to rename or move the files manually (it will take so much time )?
 
I'm trying to copy some files to OneDrive for Business, but I keep getting errors about file paths being too long. many of the files have long names or are nested deep within several subdirectories, and I'm not sure how to fix this issue. Is there a way to copy files with long paths to OneDrive for Business, or do I need to rename or move the files manually (it will take so much time )?
Hey,

Tried with shorter file name? did it work?
 
Onedrive has many many issues with nested folders like

OneDrive - Not syncing files that are 5 sub-folders deep​

You might want to try a different option other than Onedrive.

I will never use this period.

See link >>>HERE<<< Microsoft response to No Sync on folders 5 deep do some searches has a lot of issues
 
OneDrive for Business has a maximum file path length limit of 400 characters, which includes both the file name and the directory path. If you're encountering errors due to file path length, there are a few things you can do to resolve the issue:
- You can try shortening the file path by renaming folders or files to make the path shorter. You could also move the files to a higher-level folder to reduce the overall length of the file path.
- There are third-party tools available that can help you copy files with long paths to OneDrive. One such tool is called Gs Richcopy 360 which I used for a long while, also Long Path Tool can help .
 
The problem becomes a limitation of data bit size and the ability of the CPU registers to processes that data with one CPU cycle. Putting it in simple terms the O/S and or CPU will devote x amount of boxes (spaces) for the naming of each file to allow for indexing of the file. The index allows the O/S to look up the location and retrieve the data from that location. So if you have nested a long name of a file that exceeds the amount x that was allocated to name the entire deep nested name of the file the O/S would have two options. Truncate the name and store it as such, never to be seen again as the O/S will not report the truncated name. Most modern O/S will not do that but back in 16 bit CPU days it happened. The second option would be to flat out refuse to attempt to store the data with the naming convention you supplied. That's what is happening here.
That means you need to shorten the entire nest name. Start with the ending file name as this requires the most naming overhead being at the end of the chain and work backward keeping the names to something you will recognize when you retrieve them.
It's good practice to keep file names as concise as possible on the host system as well to speed indexing and use less ram and/or CPU cycles by avoiding page file storage and lookups.
I should have added keep in mind each letter in a file name is and ascii character and each letter requires two bits to be represented, even a blank space has an ascii character to represent it. All that takes memory and in order to move that file the whole name (Index) needs to be moved at the same time, it cannot be fragmented and moved in pieces.
 
Last edited:
overall, shorting the path names will take so much time (to find paths and to shorten it), also using paid third-party tools is not ok for me now, although Gs Richcopy 360 and Long Path Tool look good from the reviews, I still searching for a non paid way to just handle this issue without searching for the paths and shortening it that may be over 1000 .

PS: 400 characters inside OneDrive for business as a path length is not my issue , the problem is in the windows files long path
 
You can use tool like Path Scanner (free tool) to detect all the long path names and then compress all the detected files into one single file (zip, rar ,.......etc) , then you can transfer it to Onedrive for business
 
The good news, Gs Richcopy solved my issue, the bad news: I had to pay for the license of the standard edition.

PS: The tool can handle and copy long paths to Onedrive for business easily and quickly, but over 400 characters from an Onedrive account to another account, is nothing to work around, it is a Microsoft policy.
 
Converslely on the cheap, couldn't you just use a file compression tool to avoid all that messy software. Once on board the host computer you could reconstruct the file paths automatically. I still contend some disiplined file naming structure at the start could avoid this problem entirely. You are aware you are just kicking the can down the road and haven't really come up with a hard documentable solution but rather you are relying of 3rd party software that may no longer be around in the future.
 
Back