countmypennies
New member
- Local time
- 4:13 AM
- Messages
- 24
I have a outlook backup program that backs up all the mail and offers a way to enter a POST Backup CMD
The program runs great and if I add a script (bat file) in the post back up CMD area, it will also run perfectly separately
BUT
I have two (2) scripts (.bat files) I would like to run, one after the other,,, but NOT sure how to join them..
I included the 2 scripts here if someone can help me?
bat file one: (backup_additional_settings.bat)
and here is the second bat file: (keep_n_backups.bat)
any help would be GREAT !
..
The program runs great and if I add a script (bat file) in the post back up CMD area, it will also run perfectly separately
BUT
I have two (2) scripts (.bat files) I would like to run, one after the other,,, but NOT sure how to join them..
I included the 2 scripts here if someone can help me?
bat file one: (backup_additional_settings.bat)
Code:
@ECHO OFF
rem set backup folder here
pushd \\FILESERVER\OUTLOOK\CD-OPTI9020
setlocal EnableDelayedExpansion
rem backup signatures
copy "%APPDATA%\Microsoft\Signatures\*" *
rem backup registry settings
rem uncomment for outlook 2010
rem regedit /e outlook_settings_backup.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
rem uncomment for outlook 2013
rem regedit /e outlook_settings_backup.reg "HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Profiles"
rem uncomment for outlook 2016
rem regedit /e outlook_settings_backup.reg "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles"
endlocal
and here is the second bat file: (keep_n_backups.bat)
Code:
@echo off
setlocal enableextensions enabledelayedexpansion
rem set max no of backups to keep and backup folder
set MAX_BACKUP=5
pushd \\FILESERVER\OUTLOOK\CD-OPTI9020
set rev=0
rem read last revision no
if exist revision.txt (
for /f "delims=" %%a in (revision.txt) do (
set rev=%%a
)
)
Set /A rev=!rev!+1
Set /A rev=!rev! %% !MAX_BACKUP!
rem find pst-file and rename
FOR /F "delims=" %%I IN ('DIR *.pst *.ost /B') DO (
set x=%%I
if exist "!x:~0,-4!_!rev!.bak" del "!x:~0,-4!_!rev!.bak"
ren "!x!" "!x:~0,-4!_!rev!.bak"
)
echo !rev! > revision.txt
endlocal
any help would be GREAT !
..
My Computer
- Computer type
- PC/Desktop
- OS
- windows 7 home premium 64 bit