How to copy multiple files showing all on the same copying progress dialog










0















I've created a multiple drive copier. What happens is that all removable drives are listed in a listbox (lstDrives)
then the source of the folder I want to copy to the drives is (txtBrowseFolder.Text)



It loops through the list of drives and copies to each drive.
Now my issue is that, since it is a loop, it takes it time to copy one drive after the other,
BUT I wish it will copy all at once using the same copying dialog; showing all the copying progress of each item being copied.



Below is my code:



Private Sub cmdCopyDrives_Click(sender As Object, e As EventArgs) Handles cmdCopyDrives.Click
Dim sDrive As String
strSource = txtBrowseFolder.Text

Dim d As Integer

For d = 0 To lstDrives.Items.Count - 1
sDrive = lstDrives.Items(d).ToString

My.Computer.FileSystem.CopyDirectory(strSource, sDrive, FileIO.UIOption.AllDialogs, FileIO.UICancelOption.DoNothing)
Next
End Sub









share|improve this question
























  • If you start your program running so that the Windows copy dialog appears and at the same time manually copy a different drive, does the copy dialog now appear as you want, or does another dialog appear? That is, does Windows automatically combine them for you? If so, I can suggest something.

    – Andrew Morton
    Nov 16 '18 at 11:03











  • You see, it combines into only one progress dialog if copying manually but in this case, since the copying command is in a loop, it copies one after the other, thus one progress shows, then goes off then the next comes then goes off after completion of each.

    – SamuelDexter
    Nov 16 '18 at 11:32











  • What happens if you try what I suggested?

    – Andrew Morton
    Nov 16 '18 at 11:54











  • yes. I did. i realized it didnt join the ongoing progress because its on the same drive, but unless the files are being copied on different drives. :D

    – SamuelDexter
    Nov 16 '18 at 16:46
















0















I've created a multiple drive copier. What happens is that all removable drives are listed in a listbox (lstDrives)
then the source of the folder I want to copy to the drives is (txtBrowseFolder.Text)



It loops through the list of drives and copies to each drive.
Now my issue is that, since it is a loop, it takes it time to copy one drive after the other,
BUT I wish it will copy all at once using the same copying dialog; showing all the copying progress of each item being copied.



Below is my code:



Private Sub cmdCopyDrives_Click(sender As Object, e As EventArgs) Handles cmdCopyDrives.Click
Dim sDrive As String
strSource = txtBrowseFolder.Text

Dim d As Integer

For d = 0 To lstDrives.Items.Count - 1
sDrive = lstDrives.Items(d).ToString

My.Computer.FileSystem.CopyDirectory(strSource, sDrive, FileIO.UIOption.AllDialogs, FileIO.UICancelOption.DoNothing)
Next
End Sub









share|improve this question
























  • If you start your program running so that the Windows copy dialog appears and at the same time manually copy a different drive, does the copy dialog now appear as you want, or does another dialog appear? That is, does Windows automatically combine them for you? If so, I can suggest something.

    – Andrew Morton
    Nov 16 '18 at 11:03











  • You see, it combines into only one progress dialog if copying manually but in this case, since the copying command is in a loop, it copies one after the other, thus one progress shows, then goes off then the next comes then goes off after completion of each.

    – SamuelDexter
    Nov 16 '18 at 11:32











  • What happens if you try what I suggested?

    – Andrew Morton
    Nov 16 '18 at 11:54











  • yes. I did. i realized it didnt join the ongoing progress because its on the same drive, but unless the files are being copied on different drives. :D

    – SamuelDexter
    Nov 16 '18 at 16:46














0












0








0








I've created a multiple drive copier. What happens is that all removable drives are listed in a listbox (lstDrives)
then the source of the folder I want to copy to the drives is (txtBrowseFolder.Text)



It loops through the list of drives and copies to each drive.
Now my issue is that, since it is a loop, it takes it time to copy one drive after the other,
BUT I wish it will copy all at once using the same copying dialog; showing all the copying progress of each item being copied.



Below is my code:



Private Sub cmdCopyDrives_Click(sender As Object, e As EventArgs) Handles cmdCopyDrives.Click
Dim sDrive As String
strSource = txtBrowseFolder.Text

Dim d As Integer

For d = 0 To lstDrives.Items.Count - 1
sDrive = lstDrives.Items(d).ToString

My.Computer.FileSystem.CopyDirectory(strSource, sDrive, FileIO.UIOption.AllDialogs, FileIO.UICancelOption.DoNothing)
Next
End Sub









share|improve this question
















I've created a multiple drive copier. What happens is that all removable drives are listed in a listbox (lstDrives)
then the source of the folder I want to copy to the drives is (txtBrowseFolder.Text)



It loops through the list of drives and copies to each drive.
Now my issue is that, since it is a loop, it takes it time to copy one drive after the other,
BUT I wish it will copy all at once using the same copying dialog; showing all the copying progress of each item being copied.



Below is my code:



Private Sub cmdCopyDrives_Click(sender As Object, e As EventArgs) Handles cmdCopyDrives.Click
Dim sDrive As String
strSource = txtBrowseFolder.Text

Dim d As Integer

For d = 0 To lstDrives.Items.Count - 1
sDrive = lstDrives.Items(d).ToString

My.Computer.FileSystem.CopyDirectory(strSource, sDrive, FileIO.UIOption.AllDialogs, FileIO.UICancelOption.DoNothing)
Next
End Sub






vb.net copying system.io.file






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 10:02









Martin

5,4471332




5,4471332










asked Nov 16 '18 at 9:56









SamuelDexterSamuelDexter

1117




1117












  • If you start your program running so that the Windows copy dialog appears and at the same time manually copy a different drive, does the copy dialog now appear as you want, or does another dialog appear? That is, does Windows automatically combine them for you? If so, I can suggest something.

    – Andrew Morton
    Nov 16 '18 at 11:03











  • You see, it combines into only one progress dialog if copying manually but in this case, since the copying command is in a loop, it copies one after the other, thus one progress shows, then goes off then the next comes then goes off after completion of each.

    – SamuelDexter
    Nov 16 '18 at 11:32











  • What happens if you try what I suggested?

    – Andrew Morton
    Nov 16 '18 at 11:54











  • yes. I did. i realized it didnt join the ongoing progress because its on the same drive, but unless the files are being copied on different drives. :D

    – SamuelDexter
    Nov 16 '18 at 16:46


















  • If you start your program running so that the Windows copy dialog appears and at the same time manually copy a different drive, does the copy dialog now appear as you want, or does another dialog appear? That is, does Windows automatically combine them for you? If so, I can suggest something.

    – Andrew Morton
    Nov 16 '18 at 11:03











  • You see, it combines into only one progress dialog if copying manually but in this case, since the copying command is in a loop, it copies one after the other, thus one progress shows, then goes off then the next comes then goes off after completion of each.

    – SamuelDexter
    Nov 16 '18 at 11:32











  • What happens if you try what I suggested?

    – Andrew Morton
    Nov 16 '18 at 11:54











  • yes. I did. i realized it didnt join the ongoing progress because its on the same drive, but unless the files are being copied on different drives. :D

    – SamuelDexter
    Nov 16 '18 at 16:46

















If you start your program running so that the Windows copy dialog appears and at the same time manually copy a different drive, does the copy dialog now appear as you want, or does another dialog appear? That is, does Windows automatically combine them for you? If so, I can suggest something.

– Andrew Morton
Nov 16 '18 at 11:03





If you start your program running so that the Windows copy dialog appears and at the same time manually copy a different drive, does the copy dialog now appear as you want, or does another dialog appear? That is, does Windows automatically combine them for you? If so, I can suggest something.

– Andrew Morton
Nov 16 '18 at 11:03













You see, it combines into only one progress dialog if copying manually but in this case, since the copying command is in a loop, it copies one after the other, thus one progress shows, then goes off then the next comes then goes off after completion of each.

– SamuelDexter
Nov 16 '18 at 11:32





You see, it combines into only one progress dialog if copying manually but in this case, since the copying command is in a loop, it copies one after the other, thus one progress shows, then goes off then the next comes then goes off after completion of each.

– SamuelDexter
Nov 16 '18 at 11:32













What happens if you try what I suggested?

– Andrew Morton
Nov 16 '18 at 11:54





What happens if you try what I suggested?

– Andrew Morton
Nov 16 '18 at 11:54













yes. I did. i realized it didnt join the ongoing progress because its on the same drive, but unless the files are being copied on different drives. :D

– SamuelDexter
Nov 16 '18 at 16:46






yes. I did. i realized it didnt join the ongoing progress because its on the same drive, but unless the files are being copied on different drives. :D

– SamuelDexter
Nov 16 '18 at 16:46













1 Answer
1






active

oldest

votes


















0














It does look like it copies all the drives. Unless you mean by "all at once" something other than one code line.



To show progress, use the ProgressBar Control. You know the total number of drives to process (lstDrives.Items.Count) so you can update the bar just before your Next staetment in the For...Next loop.






share|improve this answer























  • No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

    – SamuelDexter
    Nov 16 '18 at 10:32












  • @SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

    – SezMe
    Nov 17 '18 at 17:42











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53335360%2fhow-to-copy-multiple-files-showing-all-on-the-same-copying-progress-dialog%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














It does look like it copies all the drives. Unless you mean by "all at once" something other than one code line.



To show progress, use the ProgressBar Control. You know the total number of drives to process (lstDrives.Items.Count) so you can update the bar just before your Next staetment in the For...Next loop.






share|improve this answer























  • No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

    – SamuelDexter
    Nov 16 '18 at 10:32












  • @SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

    – SezMe
    Nov 17 '18 at 17:42















0














It does look like it copies all the drives. Unless you mean by "all at once" something other than one code line.



To show progress, use the ProgressBar Control. You know the total number of drives to process (lstDrives.Items.Count) so you can update the bar just before your Next staetment in the For...Next loop.






share|improve this answer























  • No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

    – SamuelDexter
    Nov 16 '18 at 10:32












  • @SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

    – SezMe
    Nov 17 '18 at 17:42













0












0








0







It does look like it copies all the drives. Unless you mean by "all at once" something other than one code line.



To show progress, use the ProgressBar Control. You know the total number of drives to process (lstDrives.Items.Count) so you can update the bar just before your Next staetment in the For...Next loop.






share|improve this answer













It does look like it copies all the drives. Unless you mean by "all at once" something other than one code line.



To show progress, use the ProgressBar Control. You know the total number of drives to process (lstDrives.Items.Count) so you can update the bar just before your Next staetment in the For...Next loop.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 16 '18 at 10:20









SezMeSezMe

189114




189114












  • No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

    – SamuelDexter
    Nov 16 '18 at 10:32












  • @SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

    – SezMe
    Nov 17 '18 at 17:42

















  • No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

    – SamuelDexter
    Nov 16 '18 at 10:32












  • @SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

    – SezMe
    Nov 17 '18 at 17:42
















No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

– SamuelDexter
Nov 16 '18 at 10:32






No I am not seeking to show a progress for the entire sequence of copying progress. I am seeking to make all the copying show on the same Windows copying dialog (in Windows 10) just as you will see when you are manually copying multiple files and the progress for each showing at the same time

– SamuelDexter
Nov 16 '18 at 10:32














@SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

– SezMe
Nov 17 '18 at 17:42





@SamuelDexter Then you will have to create your own dialog box containing a multi-line TexctBox or ListBox. Do you need some example code to do that?

– SezMe
Nov 17 '18 at 17:42



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53335360%2fhow-to-copy-multiple-files-showing-all-on-the-same-copying-progress-dialog%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党