Problems Copying Large Directories

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In one of the applications we use, we are copying directories from one folder to another. We often run into a problem that Windows cannot handle a file path longer that 255 characters. This is not a VB datatype issue; we get the same problem if we CTRL+C and CTRL+V to another directory. Unfortunately, we have to maintain the folder structure of the folders that we are copying. Does anyone know of anyway around this problem in Windows or a solution in VB? Any help would be greatly appreciated. Please reply directly to me if that is possible. I am not a regular visitor to this group.
 
I would try finding a solution to the "we have to maintain the folder
structure of the folders that we are copying" part. Where is this structure
coming from? And why can you not deviate from it? Whoever named a
directory with 300 characters or whatever is insane.

Ray at work


Eric Powell said:
In one of the applications we use, we are copying directories from one
folder to another. We often run into a problem that Windows cannot handle a
file path longer that 255 characters. This is not a VB datatype issue; we
get the same problem if we CTRL+C and CTRL+V to another directory.
Unfortunately, we have to maintain the folder structure of the folders that
we are copying. Does anyone know of anyway around this problem in Windows or
a solution in VB? Any help would be greatly appreciated. Please reply
directly to me if that is possible. I am not a regular visitor to this
group.
 
Unfortunately, for confidentiality reasons, I cannot go into why we cannot deviate from the initial structure, and it would make my life much easier if we could, but we can't. Also, individual directories are not named with 300 character names but rather the directories, in some cases are very deep. Ex: c:\Program Files\Internet Explorer\Temprary Internet Files\...\...\...\...\...\... to the point where the length of the entire path is greater than 255 chars...

Thanks for the thought

Eric.
 
Eric Powell said:
Unfortunately, for confidentiality reasons, I cannot go into why we cannot deviate from the initial structure, and it would make
my life much easier if we could, but we can't. Also, individual directories are not named with 300 character names but rather the
directories, in some cases are very deep. Ex: c:\Program Files\Internet Explorer\Temprary Internet Files\...\...\...\...\...\... to
the point where the length of the entire path is greater than 255 chars...

That's poor design, usually a result of a lazy application port
from Unix. E.g. we ran into all kinds of problems with Interleaf
publishing software because of its insane directory depths.
Even if you can get basic Windows functions like Explorer to
work properly, you'll still have problems with disk repair utils,
defraggers etc etc etc.

Rick
 
Eric said:
In one of the applications we use, we are copying directories from one folder to another. We often run into a problem that Windows cannot handle a file path longer that 255 characters. This is not a VB datatype issue; we get the same problem if we CTRL+C and CTRL+V to another directory. Unfortunately, we have to maintain the folder structure of the folders that we are copying. Does anyone know of anyway around this problem in Windows or a solution in VB? Any help would be greatly appreciated. Please reply directly to me if that is possible. I am not a regular visitor to this group.

Eric, you can try subst'ing a drive letter to somewhere as deep in the
directory tree structure as possible, then use the subst'ed drive letter
instead.

hth
 
Back
Top