Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Vb 6.0 Need help with a few commands...


  • Please log in to reply

#1
Tex©

Tex©

    New Member

  • Member
  • Pip
  • 2 posts
Ok this is my problum I'm creating a menu for a cd\dvd im going to burn well im trying to copy a file from the cd\dvd to the desktop but i need a username befor the desktop folder somthing like this

FileCopy "programfolder\folder\file.exe", "%Username%\Desktop\file.exe"

I already know from experience that you need somthing else to do this and also I know that in win 2000
the directory is different from win xp so i need a command for that as well so looking for ideas...

Edited by Tex©, 19 October 2006 - 11:02 AM.

  • 0

Advertisements


#2
officialblueboys

officialblueboys

    Member

  • Member
  • PipPipPip
  • 138 posts
I've made this code . Put this code in the command button

Dim source As String
Dim path As String
Dim target As String

source = "programfolder\folder\file.exe" ' the source of file to copied
path = Environ("homedrive") ' determine the windows drive
target = Environ("homepath") ' determine the documents and settings folder


FileCopy (source), (path & target & "\Desktop\file.exe")

Edited by officialblueboys, 27 October 2006 - 01:51 AM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP