Backup Process
Posted: Thu Dec 03, 2020 9:13 pm
Hey guys, I have the following code for creating zip folders(data,applogs,etc) in the zip folder
I want it to create zip folders with the timestamp
The commented line #ExecuteCommand( strBATCall, 1 );
creates the zip folder succesfully
the uncommented executecommand runs but does not create anything,
my folder path looks like this----> 'E:\TM1 Server\BBI\Config\CleanUp.bat '
the ascii output outputs----> "E:\TM1 Server\BBI\Config\CleanUp.bat E:\TM1 Server\BBI\DATA\ 20201203155539 3 3 "
the code
sProcName = GETPROCESSNAME();
cubGlobal = 'SysControl';
strTimeStamp = ' ' | TIMST (NOW, '\Y\m\d\h\i\s' ) | ' ';
strPath = CELLGETS('SysControl', 'Log Path', 'String');
sLogFile = strPath | sProcName | strTimeStamp | '.Log';
strConfigPath = TRIM(CELLGETS(cubGlobal, 'Config Directory', 'String'));
strServerPath = TRIM(CELLGETS(cubGlobal, 'Server Data Directory', 'String'));
strBATCall= strConfigPath | 'CleanUp.bat ';
strDataDir= ' ' | strServerPath | ' ';
strLogDays=' 3 ';
strZipDays=' 3 ';
ASCIIOUTPUT( sLogfile, strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays ) ;
#ExecuteCommand( strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays, 1 ) ;
ExecuteCommand( strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays, 1 ) ;
#ExecuteCommand( strBATCall, 1 );
I want it to create zip folders with the timestamp
The commented line #ExecuteCommand( strBATCall, 1 );
creates the zip folder succesfully
the uncommented executecommand runs but does not create anything,
my folder path looks like this----> 'E:\TM1 Server\BBI\Config\CleanUp.bat '
the ascii output outputs----> "E:\TM1 Server\BBI\Config\CleanUp.bat E:\TM1 Server\BBI\DATA\ 20201203155539 3 3 "
the code
sProcName = GETPROCESSNAME();
cubGlobal = 'SysControl';
strTimeStamp = ' ' | TIMST (NOW, '\Y\m\d\h\i\s' ) | ' ';
strPath = CELLGETS('SysControl', 'Log Path', 'String');
sLogFile = strPath | sProcName | strTimeStamp | '.Log';
strConfigPath = TRIM(CELLGETS(cubGlobal, 'Config Directory', 'String'));
strServerPath = TRIM(CELLGETS(cubGlobal, 'Server Data Directory', 'String'));
strBATCall= strConfigPath | 'CleanUp.bat ';
strDataDir= ' ' | strServerPath | ' ';
strLogDays=' 3 ';
strZipDays=' 3 ';
ASCIIOUTPUT( sLogfile, strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays ) ;
#ExecuteCommand( strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays, 1 ) ;
ExecuteCommand( strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays, 1 ) ;
#ExecuteCommand( strBATCall, 1 );