|
-
Jul 6th, 2011, 02:20 AM
#1
Thread Starter
Addicted Member
Copy file/directory to new path -- Pause?
How can i insert a pause/Resume command when copying files/directories?
-
Jul 6th, 2011, 02:32 AM
#2
Re: Copy file/directory to new path -- Pause?
Unless you are copying a file yourself by reading and writing data directly, you can't pause. If you call File.Copy then you can't do anything until it either succeeds or fails.
If you're copying a folder file by file yourself then you can pause in between files, but if you called CopyDirectory then you can't pause that either.
So, what exactly are your circumstances?
-
Jul 6th, 2011, 02:57 AM
#3
Thread Starter
Addicted Member
Re: Copy file/directory to new path -- Pause?
We live in South Africa and we have some very crappy internet providers. We want to convert our ftp system which basically syncs data between our branches to accommodate a pause function when the connection drops. (sometimes the ftp will drop to below 4k/s)
We also have a local "control system" where users can browse the fileserver using our "desktop" (The users don't have access to windows itself). The application works as follows:
Lets say you want skype on your pc. You will log into the fileserver, using the desktop and browse the applications that was OK'd by management. You can then select the application and click the install button next to it.
The user will see two sets of dialog boxes.
1) The standard windows dialog when copying the file from the server to the pc.
2) The installation process.
Now sometimes the connection (LAN) will get very slow because of traffic, especially on month end. We want to keep a standard theme throughout the desktop where both ftp and file copy can be paused and resumed at a later time.
This way I can also create a function that will manage traffic eg. pausing the copy automatically when fileserver starts to take some strain.
I'm using the very basic copy made available in vb.net 2010
vb Code:
My.Computer.FileSystem.CopyDirectory(strFileServerIP & "\FSI\APPR_INS\" & strSelApp, "C:\bodega\Installs\", Microsoft.VisualBasic.FileIO.UIOption.AllDialogs)
I'm sorry if my explanation does not make a lot of sense. English is my 3rd language
-
Jul 6th, 2011, 02:59 AM
#4
Thread Starter
Addicted Member
Re: Copy file/directory to new path -- Pause?
 Originally Posted by jmcilhinney
Unless you are copying a file yourself by reading and writing data directly, you can't pause. If you call File.Copy then you can't do anything until it either succeeds or fails.
If you're copying a folder file by file yourself then you can pause in between files, but if you called CopyDirectory then you can't pause that either.
So, what exactly are your circumstances?
Can you perhaps give me an example on how to copy the files/Directories like you stated above?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|