PDA

View Full Version : Abort on Fail question....


qwerty
06-24-2007, 05:48 PM
on some of the actions, there is an option "Abort on Fail" options being true or false.

now, this is going to be a strange question, but please humour me !!

can someone explain to me the purpose of this option please ?

as the way i see it, each of these actions is a single task thing, for example file delete, it either deletes the file or doesnt ... end of action, so why have an option to abort on fail, or does it refer to the script as a whole ?

or does it affect the lasterror code ?


reason i ask is because i am having some issues with part of my code relating to file copy and file delete actions ... as in they arent working !!

i think the OS is protecting the files, stopping the delete, or when copying files, if the original file is a higher/newer build and the over-write is not taking place, however, my error check routine which looks for a any error code other than 0 after all the transfers/deletes is not flagging any error :(


i hope that makes sense to someone !

RizlaUK
06-24-2007, 05:56 PM
the "Abort On Fail" is for when you are copying/deleting more than 1 file, if its set to true and you have a list of 20 files to delete and a error occurs on file 3 then the rest are not deleted, if set to false it will carry on deleting the rest of the files weather there was a error on file 3 or not, same for file copy as well

post the code you have, maybe there is something wrong

qwerty
06-24-2007, 06:18 PM
ok, i understand now .... the code is all fragmented at the moment, so that it pauses through each step and i can check the progress of the various delete + transfer steps one at a time, i'll get there in the end, this question was just so that i could eliminate one possibility that i didnt understand fully, and will now move on through the checks.

if i get through checking and can't find the problem i'll post back with the offending chunk of code

cheers for explaining :)

RizlaUK
06-24-2007, 06:24 PM
hey no problem, good luck with the checking process