FileCopy fails

Sparda
07-11-2004, 03:01 PM
It's been a while since the last post, but I tried using the copy and paste code, FileCopy("c:\test1.txt","c:\test\text1.txt"), but I keep getting an error message "Compile Error: Expected: =" and other times when I change both addresses I get another error message "Run-time error '75: Path/File access error'" even though the file is there and the addresses are correct.
I'm not sure what I could be doing wrong, so any help would be great, thanks

Flyguy
07-11-2004, 03:50 PM
First remove the () from the function call.
Second make sure the c:\test does exist, because the filecopy command file will not create directories.

charlie
07-11-2004, 04:08 PM
As FlyGuy says remove the () on functions when they're alone. For example:

SomeFunction "SomeParameter", AnotherParameter

But you got to put the () in cases like this:

myVar = SomeFuntion("SomeParameter", AnotherParameter)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum