Long File Name Issues with Windows 2000 Copy operation:

C

CMK

Recently I have encountered an error when attempting to copy files from
one network location to another. Both the source server and
destination server are Windows 2000. The client I am using to copy the
data is also Windows 2000. I Terminal into one Server and then map a
drive to a share on the server where the information I wish to copy is
located. Then I attempt to paste this information on the server I am
terminaled into and receive the error "the filename you specified is
invalid or too long" ... could not copy.

Too avoid this problem, I can open up my Terminal Session on Server A,
and then Map a drive from Terminal A to \\ServerB\Share\Foldertocopy.
But I also have to Map a drive from the Server A terminal session to
the the folder on Server A where I would like to "paste" the files.

Even though I have a workaround, I can find no Microsoft information
which supports why this works, or what the problem is in the first
place. I need to know the root cause so that a process change can be
instituted which would prevent this from occurring.

Your help would be greatly appreciated!
 
D

David H. Lipman

From: "CMK" <[email protected]>

| Recently I have encountered an error when attempting to copy files from
| one network location to another. Both the source server and
| destination server are Windows 2000. The client I am using to copy the
| data is also Windows 2000. I Terminal into one Server and then map a
| drive to a share on the server where the information I wish to copy is
| located. Then I attempt to paste this information on the server I am
| terminaled into and receive the error "the filename you specified is
| invalid or too long" ... could not copy.
|
| Too avoid this problem, I can open up my Terminal Session on Server A,
| and then Map a drive from Terminal A to \\ServerB\Share\Foldertocopy.
| But I also have to Map a drive from the Server A terminal session to
| the the folder on Server A where I would like to "paste" the files.
|
| Even though I have a workaround, I can find no Microsoft information
| which supports why this works, or what the problem is in the first
| place. I need to know the root cause so that a process change can be
| instituted which would prevent this from occurring.
|
| Your help would be greatly appreciated!

The max. path is 256 chars. When you MAP a drive letter you effectively shorten the path.

The folders that are being copid to need to be fallter or the files/folders need to have
LESS cahrs. in their respective names. Another Workaround is to the the SUBST.EXE command
to substitute a drive letter for a sub-folder on the local PC.
 
P

Pegasus \(MVP\)

CMK said:
Recently I have encountered an error when attempting to copy files from
one network location to another. Both the source server and
destination server are Windows 2000. The client I am using to copy the
data is also Windows 2000. I Terminal into one Server and then map a
drive to a share on the server where the information I wish to copy is
located. Then I attempt to paste this information on the server I am
terminaled into and receive the error "the filename you specified is
invalid or too long" ... could not copy.

Too avoid this problem, I can open up my Terminal Session on Server A,
and then Map a drive from Terminal A to \\ServerB\Share\Foldertocopy.
But I also have to Map a drive from the Server A terminal session to
the the folder on Server A where I would like to "paste" the files.

Even though I have a workaround, I can find no Microsoft information
which supports why this works, or what the problem is in the first
place. I need to know the root cause so that a process change can be
instituted which would prevent this from occurring.

Your help would be greatly appreciated!

The root cause is your habit of putting your information into the
folder + file name instead of inside the file itself.

David gave you two work-arounds: to map a share or to substitute
a drive. The remedy is to keep your file + folder names short.
=========
To illustrate what I say: The text above the divider line in this post
is 250 characters long!
 
D

David H. Lipman

From: "David H. Lipman" <[email protected]>


|
| The max. path is 256 chars. When you MAP a drive letter you effectively shorten the path.
|
| The folders that are being copid to need to be fallter or the files/folders need to have
| LESS cahrs. in their respective names. Another Workaround is to the the SUBST.EXE command
| to substitute a drive letter for a sub-folder on the local PC.
|

That should have read...

The folders that are being copied to need to be flatter or the files/folders need to have
LESS characters.
 
C

CMK

But why should I need to map a drive on the paste operation? For
instance, if I have received this error with files whos names are only
67 Characters long. That isn't too long. But that file may be nested
in several folders, which would exceed the path length of 255
characters.

In my mind, if I can see the file that I want to copy in Windows, then
it shouldn't matter where I paste that file, regardless of how deep the
structure is, because it is a file creation event on the paste.

Again ... I am digging for a Microsoft Article which explains this ...
but there are just none out there ... which is frustrating, because
this seems like it would be a good topic to explain thoroughly.
 
J

John John

It's a well known issue. The long filename includes the path, it can
quickly surpass the 256 character limit if it is deeply nested. We
usually refer to it as long filename but in reality it's MAX_PATH length.

Path Too Long Error Message When Exceeding MAX_PATH
http://support.microsoft.com/kb/177665

The solution is to shorten the path length by renaming it, use the net
use or subst command or to use software that can traverse deep paths.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top