Avatar of David Bird
David Bird
Flag for United States of America asked on

File path too long reading recursive files and folders

I have inherited a windows 2003 SBS server network where over the years literally millions of files have accumulated. Moving/archiving them to the new server fails because many files are over 300 characters in the path and file name.  I am unable to run my code against the folder tree as it fails when it hits one of these files.  I don't want to trap the error and skip it. It's those files specifically I'm looking for.  While secondary but not entirely rhetorical, to me it begs the question, how were the files ever written in the first place?
I would appreciate any help on how to, via vb.net if possible, read the folder tree and store it in a data table so that we can access and rename these files to a reasonable length and move them off of the server.

.NET Programming

Avatar of undefined
Last Comment
David Bird

8/22/2022 - Mon

Probably by desktop shortcuts to the middle of the path.  255 is the limit but users find a way around that and is a constant pain to Network Admins.
David Bird

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
David Bird

No one responded and as I continued my quest, I found Delimon's IO replacement
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy