Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping a file copy in progress...

Status
Not open for further replies.

JustinWillis

IS-IT--Management
Feb 6, 2003
21
GB
Hi all, does anyone know of a way to see and stop a file transfer that is happening?

My scenario...
have an NT4/5 Server which has a shared drive, my app would be running on the server, have a client machine which copies a file to the shared drive on the server (accros the lan), file being copied is 1GB in size for example, I want my app to know that a file copy is taking place and abort the file copy which is being done from the client side.

I don't think this is possible without some heavy work and a huge headache but any suggestions would be much appreciated!

Regards,
Justin Willis.
 
Would it be easier to set permissions for file transfer on the server?

Or, create a service that runs every minute or so and deletes files that are copied on from somewhere else, if they are of too big a size, or whatever the restriction is.
That might be easier that stopping the transfer completely.

Hope that helps.


"if it is stupid but it works, then it isnt stupid"
 
ok, say for example that I want to let everyone copy files to the share as long as they are less than 1GB, how can I do this? deleting the >1GB file after the copy is not much good to me as that is what I am currently having to do.

I am setting NTFS permissions through my app for other reasons but I don't seem to be able to use it in this scenario.

If the server has <1GB of disk space remaining then copying a file >1GB will fail and possible cause ther apps on the server to have problems in that instant if they try to write to the disk (Exchange server being one).

Hope I have explained my problem clear now,
Thanks for your ideas! it's a toughy.

JW.
 
Look at NetSessionDel function in Win32 API reference. I don't think it would hard to understand how it works. If you still have questions then just ask.

--- markus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top