1.

Solve : is posible COPY longpath file??

Answer»

Hi there.

I'm try to do this kind of COPY:

copy \\main\c\dir0\dir1\dir2\dir3\dir4\file.txt \\additional /y

As a result i get this: The network path was not found.
When i try short path, like:

copy \\main\c\dir0\dir1\dir2\dir3\file.txt \\additional /y

Everything works fine.
Whay i'm doing wrong? Or may be there is some copy-comand restriction?

Thanks in ADVANCE.




Well...
copy [long_path] \\additional /y
\\additional is the name of a computer; you also need the name of a folder

You WANT to copy something to a folder in the computer "\\additional"; that folder it's a share; you can see the valid names you can use by verifying the share names on that computer. For example, on the computer called "additional" you have the following shares:
a -- which on additional computer is in fact: c:\dir1\share1 folder
b -- --II-- c:\dir1\share2
To copy to one of those folders:
copy \\main\c\dir0\dir1\dir2\dir3\dir4\file.txt \\additional\a /y

And YES, it is a filename length restriction: 256 CHARACTERS maximum for a path (if I remember well).
So, if your [long_path] has more than 256 characters, you have to do something to reduce it.
Keep in mind that Windows makes use of Hidden DRIVE shares.

your C: drive is shaerd as C$.
to make sure you can copy, you need to authenticate first if it is differrent network.

NET USE \\REMOTEPC\ADMIN$ /USER:MYDOMAIN\MYADMIN PASSWORD.

This will create a temporary connection to that machine.

So to copy from your PC to remote PC do this.

Copy /Y c:\temp\*.* \\remotepc\C$\TEMP.

To use Long File names and Spaces.. Do this.
copy /Y c:\temp\*.* \\"remotepc\c$\temp\directory with spaces"

I might be mistaken about the open " " it could be "\\..."

I believe there is a 256 character DOS LIMIT for typing commands.



Discussion

No Comment Found