Results 1 to 5 of 5

Thread: vb.net listboxta seçilen klasörün içindeki klasörü belirli bir dizine kopyalama

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    2

    vb.net listboxta seçilen klasörün içindeki klasörü belirli bir dizine kopyalama

    Code:
    ListBox1.DataSource = New IO.DirectoryInfo("D:\Filmler").GetDirectories()
    ListBox1.DisplayMember = "Name"
    bu kod ile listboxta listeleyebiliyorum ama seçtiğim klasörün içindeki alt klasörü belirlediğim örneğin
    d:\Temp klasörü içine nasıl kopyalayacağım yardım ederseniz sevinirim
    Last edited by dday9; Apr 14th, 2021 at 04:56 PM.

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,294

    Re: vb.net listboxta seçilen klasörün içindeki klasörü belirli bir dizine kopyalama

    This is an English Language Forum. You need to translate your language into English and post, and translate responses back to your language outside the forum.
    Example:

    Copy the folder inside the selected folder in the vb.net listbox to a specific directory

    ListBox1.DataSource = New IO.DirectoryInfo ("D:\Movies"). GetDirectories ()
    ListBox1.DisplayMember = "Name"
    I can list it in the listbox with this code, but for example, where I specify the subfolder in the folder I selected
    How do I copy it into the d:\Temp folder, I would appreciate it if you could help me.

    I'm not sure I understand the question, but at least I understand the language.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    2

    Re: vb.net listboxta seçilen klasörün içindeki klasörü belirli bir dizine kopyalama

    Code:
    ListBox1.DataSource = New IO.DirectoryInfo ("D: \ Filmler"). GetDirectories ()
    ListBox1.DisplayMember = "Name"
    With this code, I can sort the folders within the folder in a listbox.
    But I want to copy the folder I selected in the listbox to another folder.
    Last edited by dday9; Apr 14th, 2021 at 04:56 PM.

  4. #4
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Skunthorpe, North Lincolnshire, England.
    Posts
    2,068

    Re: vb.net listboxta seçilen klasörün içindeki klasörü belirli bir dizine kopyalama

    Google translation of question:-

    "Copy the folder inside the selected folder in the listbox to a specific directory"


    Pop.
    Along with the sunshine there has to be a little rain sometime.

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    106,932

    Re: vb.net listboxta seçilen klasörün içindeki klasörü belirli bir dizine kopyalama

    Firstly, always set the DataSource last. Set the DisplayMember and/or ValueMember beforehand.

    As for the issue, what's the issue? Copying a folder has got nothing to do with ListBoxes. Do you know how to copy a folder or not? If not, have you tried to find out? If not, you should do that. Once you know how to copy a folder, all you have to do is then get the selected folder from the ListBox, which is a completely unrelated task. Which of those two unrelated tasks are you having an issue with and what is the specific issue?

    The reason that people have trouble with problems like this is because they treat them as one task and then, for instance, look for information on copying folders from ListBoxes. There is no such thing. Treat the two tasks as the independent tasks they are. Get a selected item from a ListBox and copy a folder. Then you just have to link the two by passing the output from the first as the input for the second.

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