Jump to content

Help with number increment


 Share

Recommended Posts

I am trying to make a script that copies directories i if and file are not equal with the exception of my documents i want an error msg box to come up which works... if successful i want it to move on to the next lin of code and if all were cumlatively successful i want a messege box to appear at the end of the script

my code is attached

NewUserBackup.au3

Link to comment
Share on other sites

What I do... maybe this helps you... I copy a file then set it's "archive attribute" ... if that file does not change, then the archive attribute remains... if the archive "bit" is not set (or set... I forget the boolean here)... then I copy... and set the bit.

This is an incremental backup scenario.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

What I do... maybe this helps you... I copy a file then set it's "archive attribute" ... if that file does not change, then the archive attribute remains... if the archive "bit" is not set (or set... I forget the boolean here)... then I copy... and set the bit.

This is an incremental backup scenario.

Lar.

What i need this for is a full backup we want the capture all files within the directory because the hard drive is going to be reimaged and after i want to return folders back to the hard drive...

Link to comment
Share on other sites

You could error handle with...

If DirCopy() Then

because DirCopy has built in error handling...

You could add up errors by getting the opposite of the return...

$err = Not Dircopy()

$err += Not DirCopy()

$err += Not FileCopy()

If $err Then MsgBox(0,"","Copy Failed")

There are many ways to render a cat as a bloody skinless mess.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

What i need this for is a full backup we want the capture all files within the directory because the hard drive is going to be reimaged and after i want to return folders back to the hard drive...

ROBOCOPY with /COPYALL /MIR switches.

:mellow:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...