View Full Version : Can't copy files with variable??

03-06-2004, 03:50 AM
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 ?

newUserFile = "Users\\"..newUserName..".zip"
File.Copy("Users\\Default.zip", newUserFile, true, true, false, true, nil);

03-06-2004, 03:58 AM
hehe, just found how to fix it :D

newUserFile = _SourceFolder.."\\Users\\"..newUserName..".zip"

thats working now ::cool