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
Re: help moving folders to desktop i have a big problem
try this:
vb Code:
Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Re: help moving folders to desktop i have a big problem
Quote:
Originally Posted by
.paul.
try this:
vb Code:
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
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:
My.Computer.FileSystem.CopyDirectory("source directory path", Environment.GetFolderPath(Environment.SpecialFolder.Desktop), FileIO.UIOption.AllDialogs)
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 :)