Folder Path length exceeds maximum length

Skybluekid

Well-known Member
Joined
Apr 17, 2012
Messages
1,231
Office Version
  1. 365
Platform
  1. Windows
Hi

I have set up a query that goes through folders to collect data. However, it gets to certain folder and then fails as it say :

The File name (file path name) is longer than the system -defined maximum lenght.

Is there any work around for this?

Thanks is advance.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Command Prompt to the rescue!
Open a command prompt and type HELP SUBST to see the syntax of the command. What it can do is create a virtual drive letter out of a folder, something like this:

Subst X: C:\Users\Username\abcdefg\qwertyuiop\asdfghjkl

Now you can use X: as that path in Power Query. It's been so long since I've used the command, I don't remember if it will come back after a reboot, but I think it will. I say that because if/when you no longer need it, the command Subst X: /D will delete the drive letter.

I'm not aware of any way to do that in native Windows.
 
Upvote 0
Solution
Thank you, jdellasala. Really stupid Question, how do you now apply the X: path in Power Query?
 
Upvote 0

Forum statistics

Threads
1,223,957
Messages
6,175,623
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top