Moving files accross the network

On a network with two Windows 2000 boxes:

1) If I an using windows Explorer to view a shared directory on the remote computer, and I drag a file from one directory on the remote box to another on the same remote box, does Windows send the entire contents of the file to my local computer and then back to the remote computer?

2) Do such file "move" operations work the same when accessing shares via command-line (i.e., in a batch file) or using other Windows API functions?

3) Is there a difference in the way this works if the share has been mapped to a drive ID?

4) If there is a process that "polls" for new files in a shared directory (using FindFirstFile() API), could that polling be an issue?  Could periodic use of the  FindFirstFile() API cause a logjam of some network activity queue?

=-=-=-=-=-=-=-=
I have a client who is experiencing intermittent delays -- sometimes several minutes in duration -- on a process that normally takes a fraction of a second.  The only thing unusual I can see about his setup is that he is using an external box to host the shared directory.

I appreciate your direct answer based upon your experience,  but please also provide a link to an article that discusses these issues.  

Thanks!
LVL 50
DanRollinsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oBdACommented:
1) Yes.
2) Yes.
3) No.
4) It might, but that might be more of a question for the programming section; it probably strongly depends on the polling interval ...

To elaborate a bit on parts 1-3:
On the remote machine, the Server service allows you to connect to the share.
On the local machine, the Workstation service (or Redirector) allows to connect to the share and makes it look like a local resource.
So if you copy a file stored on the remote machine using a local machine through a share, the file's complete content will take all the way through the network. Your workstation service passes the "read file" request to the Server service on the remote machine, the remote machine then reads the file from the hard drive and sends it back to your local machine. Your local machine will then send the "write file" request to the remote machine, which will put it back onto the hard disk.
There's no way for the remote machine to know that you're copying this file, and to "intercept" or "take ownership" of the copy and do it by itself. All the remote machine knows is that there's a read request for one file, and a write request for another file. What happens inbetween is for the local machine to decide.
Nope, I'm afraid I don't have any specific sources backing that up.
To copy large files in this case (assuming the remote machine is a server), it's best to enable terminal services in administration mode and copy the file(s) in question using an RDP session.
DanRollinsAuthor Commented:
Copying a file is a separate issue:  
The data does need to be transferred from one place to another.  It seems to me that a smart OS would see that it is going from one place on one box to another on the same box and avoid all of the network traffic, but it is understandable if it does not make that distinction.

However, a file MOVE operation is a different animal:  
There is no need for either computer to physically read the file data -- it all boils down to making minor changes to a couple of directories.  Again, a smart OS should be able to detect that situation and bypass the data read/write.
Fatal_ExceptionSystems EngineerCommented:
Smart OS = Oxymoron  eh,?  :)
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

oBdACommented:
If it's a real move (that is, the file to be moved stays on the same partition), then the remote server is smart enough to just change the file table (at least on NT4, W2k, and XP; didn't try it on W9x).
Tim HolmanCommented:
1) If I an using windows Explorer to view a shared directory on the remote computer, and I drag a file from one directory on the remote box to another on the same remote box, does Windows send the entire contents of the file to my local computer and then back to the remote computer?

I think this depends on the file system.  It doesn't sound logical to chew up bandwidth by copying the contents twice in order to achieve a file copy/move ?

2) Do such file "move" operations work the same when accessing shares via command-line (i.e., in a batch file) or using other Windows API functions?

Yes

3) Is there a difference in the way this works if the share has been mapped to a drive ID?

No

4) If there is a process that "polls" for new files in a shared directory (using FindFirstFile() API), could that polling be an issue?  Could periodic use of the  FindFirstFile() API cause a logjam of some network activity queue?

Yes - not sure what it's called, but mail, fax and other queuing programs use this sort of thing.  eg:

http://www.deksoftware.com/zetafax_capi.htm
http://www.arcosoft.com/runfax/APIGuide/RunFAXAPIGuide.htm

Might be something in MSMQ you could use too ?

http://www.thecodeproject.com/w2k/msmq.asp

Speed issues between Windows 2000 and XP clients?  Could be SMB signing -

810907 - Error Messages When You Open or Copy Network Files on Windows XP SP1 Clients That Require SMB Signing:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q810907

811492 - It May Take 35 Seconds to Delete Files with Windows XP SP1:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q811492

812937 - File Lock or Access Denied Error Message When You Save Files Over the Network:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q812937

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DanRollinsAuthor Commented:
Some useful links there.  Thanks.
-- Dan
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.