Backing up files

I have to HDD (c,d). My data files is storing at C. I want to write a VB exe program that will copy files to D as backup, it must only copy different files to D at a specific time automatically. This program will run during PC power on.

Can anybody help me?

Note : I have VB6
itacanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dosylCommented:
Maybe, Zip it using XCeed zip  (www.xceedsoft.com). Your zip file will be compatible to WinZip!

Or you can use Pkzip,PkUnzip.
0
p_biggelaarCommented:
Please tell me: only a copy? like in old times the dos copy command used to do?
0
p_biggelaarCommented:
Furthermore I'd like to know how you want to determine what files have to be copied (a particular directory, all files of a particular type, some files that are hardcoded)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

itacanAuthor Commented:
Yes p__biggelaar
but i don't want to copy same files only different ones.
0
itacanAuthor Commented:
A directory with all subdirectories
0
st_steveCommented:
even if you succeeded in writing code for that function, it would slow down windows startup considerably if you have a lot of midified files....unless you program it to run it in parallel to Windows and in background....
0
vbyuvalCommented:
Hi
You can use CopyFile command (or is it FileCopy ?) however it goes like that :
CopyFile Source,Detination

About the time you can use the Timer control .

If that waht are looking for and you need the exact code I can send you a project with a sample ,just write here your @mail .

                                                                                Enjoy
                                                                             Yuval Amir
0
p_biggelaarCommented:
Do you think you can get a copy of the scrrun.dll (it's one of the dll's that ships with VBscript)

If you can, the answer to your question will be quite easy.

The only thing you'll have to do now is insert code that looks like this:

Private Sub Command1_Click()

Dim x As New Scripting.FileSystemObject
   
    x.CreateFolder "D:\MyBackup"
    x.CopyFolder "C:\My Documents\*", "D:\MyBackup", True

End Sub

(If I'm not mistaking it should be shipped with VBscript, Office 97, Office 2000, anyway, when you've got it it should be registered and be located in the windows/system directory)

To make sure it will fire on time, you can have a timer control check for the current time (the interval you specify is up to you).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
p_biggelaarCommented:
Forgot to mention:
You should add a reference to the Microsft Scripting Runtime (the scrrun.dll)

Of course the copyfolder copies all subdirectories and files in it at once using the wildcard.
0
itacanAuthor Commented:
Thank You
0
p_biggelaarCommented:
You're welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.