Hi All,
I'm having some problems coming up with a work around for paths over the maximum character length. At present I'm getting a Runtime 76 - Path Not Found error.
I know the ideal solution would be to get the excesive folder structure corrected but the user base is large and there are other dependacies that don't really make that a viable solution.
I'm using the following function to count the number of files in folders / subfolders which is then used in a progress bar:
As I said all works fine until it encounters lengthy paths.![]()
Please Login or Register to view this content.
I've done some research into workarounds but having trouble understanding how they work in order to integrate into this code.
I've seen something about adding prefixes to the file path to cope with longer paths, "\?\" for relative and "\\?\unc\" for absolute paths (https://stackoverflow.com/questions/...onger-than-260).
And seen something called ShortPath which makes the filepath unreadable to the user but not an issue here (https://stackoverflow.com/questions/...paths-over-260).
For the life of me I can't seem to get either method integrated into this function - I'm sure that's down to my own ignorance but I have tried everything I can think of here.
Or I'm open to an alternative way of counting the number of files that doesn't hit an issue with long paths.
As always, any assistance appreciated.
Thanks, TC
Bookmarks