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 );
Backup Process
- gtonkin
- MVP
- Posts: 1261
- Joined: Thu May 06, 2010 3:03 pm
- OLAP Product: TM1
- Version: Latest and greatest
- Excel Version: Office 365 64-bit
- Location: JHB, South Africa
- Contact:
Re: Backup Process
You could try outputting from the batch file to some logs files to see what is happening e.g.
Those logs will obviously be in your data folder unless you change to log elsewhere.
I also tend to start my commands with CMD /C e.g. 'CMD /C E:\TM1 Server\BBI\Config\CleanUp.bat...'
Would also help if you can share the code in the batch file.
Code: Select all
ExecuteCommand( strBATCall | strDataDir | strTimeStamp | strLogDays | strZipDays | ' >CleanUp.log 2>CleanUpError.log', 1 ) ;
I also tend to start my commands with CMD /C e.g. 'CMD /C E:\TM1 Server\BBI\Config\CleanUp.bat...'
Would also help if you can share the code in the batch file.