Can't copy files with variable??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • SonG0han
    Forum Member
    • Dec 2003
    • 163

    Can't copy files with variable??

    hi!
    i hope anyone of you can help me with my problem.
    i want to create/copy a .zip file but it should have a variable name. but if i try to use a variable in the file.copy destination i get an error (invalid destination) :(

    here's a little code snippet. i tried it with variable in destination (see below) or put the variable content directly into the dest. field but it doesnt seem to work. is it "normal" that you cant use variables in file.copy ?


    Code:
    newUserFile = "Users\\"..newUserName..".zip"
    File.Copy("Users\\Default.zip", newUserFile, true, true, false, true, nil);
    Last edited by SonG0han; 03-06-2004, 03:55 AM.
  • SonG0han
    Forum Member
    • Dec 2003
    • 163

    #2
    hehe, just found how to fix it

    Code:
    newUserFile = _SourceFolder.."\\Users\\"..newUserName..".zip"
    thats working now :

    Comment

    Working...
    X