# Links for filepaths too long (+260) fix?



## Alejandro Gombao (Dec 21, 2022)

Hello,

I have designed an Index for a repository of documentation in which every cell has a Link to open the corresponding file.

It all works wonderfully until the paths start getting longer, since there are docens of directories and subdirectories deepness.

Is there any way so the link can work even if it's so long?

The error when you click on the link is:





I have also noticed that if I rightclick and open the "modify hyperlink", then copy the link to the file and paste it in my file explorer, it works... So I hope there is some way to bypass the error.

Thank you in advance


----------



## jdellasala (Dec 22, 2022)

Alejandro Gombao said:


> Hello,
> 
> I have designed an Index for a repository of documentation in which every cell has a Link to open the corresponding file.
> 
> ...


Have you thought of using a URL shortener? Most browsers have an extension that will do this, some against multiple services:



That's a Chrome extension simply called *Url Shortener*, and as illustrated can use several services. The shortened link for this page is *https://tinyurl.com/2hwqr7ds*


----------



## Alejandro Gombao (Dec 22, 2022)

jdellasala said:


> Have you thought of using a URL shortener? Most browsers have an extension that will do this, some against multiple services:
> View attachment 81435
> That's a Chrome extension simply called *Url Shortener*, and as illustrated can use several services. The shortened link for this page is *https://tinyurl.com/2hwqr7ds*


Hello, thanks for your reply.

Maybe it wasn't clear enough, but the "repository of documentation" I'm talking about is a series of servers located in the local network of my company. The links that lead to those files are generated automatically, directly to the excel sheet.

Don't think it would be possible to pass all those links from excel through any link shortener, to be honest...


----------



## jdellasala (Dec 22, 2022)

Alejandro Gombao said:


> Hello, thanks for your reply.
> 
> Maybe it wasn't clear enough, but the "repository of documentation" I'm talking about is a series of servers located in the local network of my company. The links that lead to those files are generated automatically, directly to the excel sheet.
> 
> Don't think it would be possible to pass all those links from excel through any link shortener, to be honest...


You would need to get the LAN technicians to provide an auxiliary shorter drive mapping further down the path. Typically a network drive like F: is mapped to the root of server storage. If all of your files are under F:\Path1\Path2\Path3, a new drive letter could be assigned to that path so to get to the files in Path3 you'd address X:\ thus shortening the path. That mapping could be done for just you and doesn't need to be a global change. In some environments you could execute the command *MAP X: F:\Path1\Path2\Path3* from a command prompt, or that command could be added to your personal login script.
Alternatively the folders would need to have their names shortened, but that could cause major problems! Good luck!


----------



## Alejandro Gombao (Dec 22, 2022)

jdellasala said:


> You would need to get the LAN technicians to provide an auxiliary shorter drive mapping further down the path. Typically a network drive like F: is mapped to the root of server storage. If all of your files are under F:\Path1\Path2\Path3, a new drive letter could be assigned to that path so to get to the files in Path3 you'd address X:\ thus shortening the path. That mapping could be done for just you and doesn't need to be a global change. In some environments you could execute the command *MAP X: F:\Path1\Path2\Path3* from a command prompt, or that command could be added to your personal login script.
> Alternatively the folders would need to have their names shortened, but that could cause major problems! Good luck!


Yeaaah I thought about that, and it is indeed already done.
Sadly, after doing that a number of about 3000 files have their lengths on around 420 chars length of full repository deepness... Guess they will have to be copy-pasting the links untill Microsoft decides to make a file explorer that supports LongPaths

Thank you anyway


----------



## jdellasala (Dec 22, 2022)

Alejandro Gombao said:


> Yeaaah I thought about that, and it is indeed already done.
> Sadly, after doing that a number of about 3000 files have their lengths on around 420 chars length of full repository deepness... Guess they will have to be copy-pasting the links untill Microsoft decides to make a file explorer that supports LongPaths
> 
> Thank you anyway


You could always open a Command Prompt window and use the command:
*DIR F:\Path1\Path2\Path3\*.xlsx /S /B >FileList.txt*
the */S *parameter is to scan all subdirectories, and the */B *parameter is to show the entire file path and name (Bare).
That will output a text file named FileList with all the files listed with their entire path through all sub directories. There will be no word wrapping in the fille even though it would wrap on the screen if that's where the output went instead of the text file.


----------

