Hi,

1 )

I must take a back up of a access data base daily and store in my desktop.

Please give me coding to copy the access data base from the c drive and to paste in my desktop.

Every time when i save the access in my desktop it should save in a different name has names with same file cannot be saved.

2)

Please give coding to save ,close all files , application and then to shut down the system.

Hi,

1 )

I must take a back up of a access data base daily and store in my desktop.

Please give me coding to copy the access data base from the c drive and to paste in my desktop.

Every time when i save the access in my desktop it should save in a different name has names with same file cannot be saved.

2)

Please give coding to save ,close all files , application and then to shut down the system.

hi,
Use can use this coding for your first quetion

Dim file As String
For Each file In Directory.GetFiles("c:\", "*.mdb")
Dim filename As String = Mid(file, 3)
FileCopy(file, "C:\Documents and Settings\Administrator\Desktop" & filename)
Next

you have to use path of desktop rather then red text and you can use filename according to you
I have no idea about your second quetion.

hi,
Use can use this coding for your first quetion

Dim file As String
For Each file In Directory.GetFiles("c:\", "*.mdb")
Dim filename As String = Mid(file, 3)
FileCopy(file, "C:\Documents and Settings\Administrator\Desktop" & filename)
Next

you have to use path of desktop rather then red text and you can use filename according to you
I have no idea about your second quetion.

Hi,

since i dnot know vb much i unable to run the program

the file name is parts.mdb

Please give modify the coding with the file name has parts.mdb.

I want to copy the parts.mdb from the c drive and to needs to pasted in the desktop.

Sine i need to take back daily i want to delate the perious back file in the desktop and paste the new one.

Please give the coding for this , sorry for not being clear in the frist time.

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.