lparameter thefile,themedia nDistErr = 0 *:Save current error handler here *:REV 9/10/01 SBB Now adding code to save the current (Nancy's) error handler & *:setting special handler for media copying. The error handler will be reset *:at the end of this method local lcOldOnError, SavePointer, theDrive * Save the original error handler lcOldOnError = on("ERROR") * code to which the error handling routine applies on error do DistErr with ; error( ), message( ), message(1), program( ), lineno( ) *:Check media types here and use the proper drive designator *:Check for media type select MediaTmp locate for themedia = MediaTmp.media_code if !empty(MediaTmp.drive) theDrive=alltrim(MediaTmp.drive)+":" else theDrive="A:" endif *:Add loop here in to retry copy if error found do while .t. *:Set error number to 0 nDistErr=0 SavePointer=thisform.mousepointer thisform.mousepointer=11 copy file (thefile) to (theDrive) thisform.mousepointer=SavePointer if nDistErr>0 && Error copying file nanswer=MyYesNo("Error Reading/Writing to Drive during copy" + theDrive + chr(13)+"Retry?") if nanswer = 6 &&Yes loop else =messagebox("Error Reading Drive " + iif(empty(MediaTmp.drive),'A',alltrim(MediaTmp.drive))+":"+chr(13)+; "Cannot Complete this job...",0,"Distribution") exit endif else exit endif enddo *REV 9/10/01 SBB * Reset the original error handler on error &lcOldOnError && ON ERROR && restore system error handlerI believe, on some systems if drive is not ready, we'll see the system level error (Windows error) and not VFP error. I have IsDriveReady function, which uses WSH. Do you think, I should re-write this method?