Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thank you.

share|improve this question

3 Answers 3

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.

share|improve this answer

I assume you are using a bat file script, so it would be like this:

@echo off
copy file1 file2

If this doesn't solve your problem, please give more details.

share|improve this answer

I don't think windows will let you do this. It would involve you invoking the command on the remote server which you might not have the authority to do. In the past for these situations I've generally terminal serviced into the server and done the copy from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.