Jump to content

Simple @Error Help Needed


Recommended Posts

Hey, I've tried searching around, and I see a lot of threads that mention stuff similar to what I'm trying to figure out, but none that directly answer my question.

Basically, I need to detect if there is an error copying over a large group of files in a script that runs nightly. I'm sure I'm just missing some small detail, but I haven't been able to figure out how to get @error to return anything other than zeroes regardless of failures. :P In pseudo code, this is what I'm trying to do:

1) Dircopy X: to Z:

2) If error, execute failure email

3) Else, execute success email

Any advice or tips would be very appreciated! :P

Link to comment
Share on other sites

Hey, I've tried searching around, and I see a lot of threads that mention stuff similar to what I'm trying to figure out, but none that directly answer my question.

Basically, I need to detect if there is an error copying over a large group of files in a script that runs nightly. I'm sure I'm just missing some small detail, but I haven't been able to figure out how to get @error to return anything other than zeroes regardless of failures. :o In pseudo code, this is what I'm trying to do:

1) Dircopy X: to Z:

2) If error, execute failure email

3) Else, execute success email

Any advice or tips would be very appreciated! :P

DirCopy() returns 1 for success, and 0 for failure. There is no mention in the help file of @error being set.

:P

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...