Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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