my address variable equal at address =C:\\prpgm\\prpgm\\program.accdb but its change every time and address doesnt work in file.copy what must ı write in parantesis that will be equal to address forc ever time
File.Copy("adress",

if you set the variable as type of string, it cannot change, because string is immutable (that means it cannot be changed ones its been created).

For sure somewhere in your code you create a new string for this variable. Double Check your code.

File.Copy(address,.....) should solve the problem, u have already assigned a string to address variable, why do you want to pass address as a string inside the quotes.
you have hard coded the path, it will not change, or make sure you have a specific logic from where you get the path. may be u can assign that path to address each time and it will work fine.

or if possible you can paste here all that you have done.

Have you managed to salve this issue? If not, please provide us more details about this issue.
thx in advance.
bye

If you are using FileCopy you need to do this:

File.Copy("Address of What You Want To Copy", "Address to Copy it To");

Hope this helps with the question you are asking and if you have already had this problem solved, please mark it as so. Thanks.

-Chris

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.