How can I get a file copied from one location to another location on the same server without the echo
Is it possible to copy a file from one location to another location on the same server without the file traveling from the server to the workstation and then back to the server. The scenario is the Microsoft Windows vista Peer to Peer network.
Solution 1:
Obviously, if you are actually logged in and issuing a copy command on the server itself, the copy operation doesn't involve any workstations. ☺ But you seem to be asking about instigating a copy command from a workstation, that copies within a single fileserver and where the whole copy operation is executed by the server itself (subject to the normal access permissions and so forth).
LAN Manager, LAN Server, and CIFS
There is no way, now, to do this. There used to be, in the SMB protocol, a command for performing server-side copies, where none of the copied data need travel across the LAN. It was SMB_COM_COPY
.
It was only ever exercised by workstations running OS/2. OS/2 applications have a DosCopy()
system API function available to them, and the OS/2 LAN Server network redirector in OS/2 was clever enough to recognize when a file was being copied from a remote network volume to a different place on that volume, and forward the entire operation to the server.
There's been no real capability for exercising SMB_COM_COPY
in workstations running MS-DOS or Windows NT. There's not even a "copy an entire file" system call in the (unextended) MS-DOS API to hook into. As such, Microsoft decided to drop that part of the protocol from NT LAN Manager, and a CIFS transaction with that command ID now simply generates an error response.
Netware
There is a way to do this. There is a whole file copy transaction in the Netware protocol, and the Netware network redirector for OS/2 was clever like the LAN Server network redirector. So again, OS/2 workstations would exercise this automatically, as applications called DosCopy()
to copy files around.
As with SMB/CIFS, there was no real way to plumb the Netware mechanism into MS-DOS proper for use by applications in general. However, there are Netware-specific extensions to the MS-DOS API. The Netware Client for MS-DOS thus came with an NCOPY
command for MS-DOS, which knew about the API extensions, called them, and thus could perform server-executed copies (that also preserved Netware file attributes).
There's an ncopy
command for Linux that issues the same Netware protocol command. There is — alas! — nothing equivalent for Windows NT, and no way to make use of this facility from a Windows NT workstation.