Results 1 to 4 of 4

Thread: Copy file/directory to new path -- Pause?

  1. #1

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    Unhappy Copy file/directory to new path -- Pause?

    How can i insert a pause/Resume command when copying files/directories?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    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?

  3. #3

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    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:
    1. 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

  4. #4

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    Re: Copy file/directory to new path -- Pause?

    Quote Originally Posted by jmcilhinney View Post
    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
  •  



Click Here to Expand Forum to Full Width