- Jul
- 5
- 0
I have a simple BTM file to copy two Outlook '.ost' files to a backup folder - an excerpt of the file is shown below. Sometimes it runs fine, at other times, it only copies one of the two '.ost' files. The error log only show that the command was aborted with no explanation. Based on another user's post, I included the force close option in Outlook in case it is still running. I also included a delay statement in case some other Outlook process had not finished. I increased the delay from 3 seconds to 6 seconds, but it still fails on occasion. If I run the BTM file manually, it always works. If it makes any difference, the '.ost' file that fails is an icloud email address. Any suggestions would be appreciated.
...
TASKEND /F OUTLOOK
DELAY 6
Set _myvar1=%%@dow[%_date]
Set _myvar2=%%@dowi[%_date]
Copy C:\Users\Robert\AppData\Local\Microsoft\Outlook\*.ost F:\OST_Backups\%_myvar2%-%_myvar1% /Y
@Echo off
Date /F0 /T
Time /T
Quit
Here is an example of the command log created when it fails [actual email address omitted for privacy reasons]
TASKEND /F OUTLOOK
DELAY 6
Set _myvar1=%@dow[01/28/22]
Set _myvar2=%@dowi[01/28/22]
Copy C:\Users\Robert\AppData\Local\Microsoft\Outlook\*.ost F:\OST_Backups\6-Fri /Y
C:\Users\Robert\AppData\Local\Microsoft\Outlook\[email address 1] - Default(2).ost => F:\OST_Backups\6-Fri\[email address 1] - Default(2).ost
C:\Users\Robert\AppData\Local\Microsoft\Outlook\[email address 2] - Default(2).ost => F:\OST_Backups\6-Fri\[email address 2] - Default(2).ost
TCC: (Sys) D:\documents\computer & electronics\Backup_OST1.btm [16] The request was aborted.
1 file copied 1 failed
Fri Jan 28, 2022
5:55:08p
D:\documents\computer & electronics >
...
TASKEND /F OUTLOOK
DELAY 6
Set _myvar1=%%@dow[%_date]
Set _myvar2=%%@dowi[%_date]
Copy C:\Users\Robert\AppData\Local\Microsoft\Outlook\*.ost F:\OST_Backups\%_myvar2%-%_myvar1% /Y
@Echo off
Date /F0 /T
Time /T
Quit
Here is an example of the command log created when it fails [actual email address omitted for privacy reasons]
TASKEND /F OUTLOOK
DELAY 6
Set _myvar1=%@dow[01/28/22]
Set _myvar2=%@dowi[01/28/22]
Copy C:\Users\Robert\AppData\Local\Microsoft\Outlook\*.ost F:\OST_Backups\6-Fri /Y
C:\Users\Robert\AppData\Local\Microsoft\Outlook\[email address 1] - Default(2).ost => F:\OST_Backups\6-Fri\[email address 1] - Default(2).ost
C:\Users\Robert\AppData\Local\Microsoft\Outlook\[email address 2] - Default(2).ost => F:\OST_Backups\6-Fri\[email address 2] - Default(2).ost
TCC: (Sys) D:\documents\computer & electronics\Backup_OST1.btm [16] The request was aborted.
1 file copied 1 failed
Fri Jan 28, 2022
5:55:08p
D:\documents\computer & electronics >