Jump to content

FileCopy problem


Recommended Posts

Ok i want to copy items from a desktop folder, so on my computer it would be like this....

FileCopy("C:\Documents and Settings\Owner\Desktop\whatever.dll", "C:\where\ever\", 1)

However this program isn't made for me, so other people might have a different computer name instead of Owner, now what i want to do is something like this.....

$User = @UserName

    FileCopy("C:\Documents and Settings\$User\Desktop\whatever.dll", "C:\what\ever\", 1)

However you can't copy a variable (or whatever that thing is with the $) inside of quotation marks so i'm screwed here, any way around this?

~TK

Link to comment
Share on other sites

Tried

FileCopy("C:\Documents and Settings\" & @User & "\Desktop\whatever.dll", "C:\what\ever\", 1)
?
lol I just thought of that right after I posted, I came back to post that i figured it out. and it's @UserName but thanks alot for the help, that will help others who have the same problem.

~TK

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...