Results 1 to 5 of 5

Thread: help moving folders to desktop i have a big problem

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2011
    Posts
    57

    help moving folders to desktop i have a big problem

    ok hello all thank you for taking your time to read this post
    right im making a program that i want to release on the internet but i want to copy a folder to the desktop but this is the problem i have

    my dir to desktop
    C:\users\elfenliedtopfan5\desktop

    if i release this on the internet not everyone username is going to be elfenliedtopfan5

    for example some one downloads my program

    and his computer name is ben
    so the dir will be
    C:\users\ben\desktop

    how do i get my program to find the username of the computer i know a installer dose it like this
    C:\users\userprofile\desktop

    but that dont work in visual basic can anyone help me resolve this please

    thank you elfenliedtopfan5

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: help moving folders to desktop i have a big problem

    try this:

    vb Code:
    1. Environment.GetFolderPath(Environment.SpecialFolder.Desktop)

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2011
    Posts
    57

    Re: help moving folders to desktop i have a big problem

    Quote Originally Posted by .paul. View Post
    try this:

    vb Code:
    1. Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
    see i got told this on another forum how do you copy a folder and add this code to move it to desktop i get confused easily lol sorry im new to this

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: help moving folders to desktop i have a big problem

    to copy a specified directory to your user's desktop (with copy dialogs):

    vb Code:
    1. My.Computer.FileSystem.CopyDirectory("source directory path", Environment.GetFolderPath(Environment.SpecialFolder.Desktop), FileIO.UIOption.AllDialogs)

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2011
    Posts
    57

    Re: help moving folders to desktop i have a big problem

    dude i ****ing love you (in non homo way) also one more question it copys amazing thank you but it all the folders to the desktop is there anyway it can copy the whole folder to the desktop with out adding all the folders in the folder to the desktop individuality but thank you so much

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