TI process to delete log files: Access denied

Post Reply
holger_b
Posts: 131
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: Planning Analytics 2.0
Excel Version: 2016
Location: Freiburg, Germany

TI process to delete log files: Access denied

Post by holger_b »

Dear forum,

I am trying to set up a housekeeping process for log files. The idea ist to first zip older log files and subsequently delete the original files with ExecuteCommand('cmd /c del ...').

Unfortunately access is denied. In Windows Explorer, I can delete these files with administrator rights, but the del command fails using the 'normal' DOS prompt (Access denied). The account which runs the TM1 service has administrator privileges. This is TM1 9.5.2 on Windows Server 2008.

Any ideas?

Regards
Holger
User avatar
Steve Rowe
Site Admin
Posts: 2464
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: TI process to delete log files: Access denied

Post by Steve Rowe »

The only obvious one is that you are trying to delete one of the live log files. If you are sure that you are working on the time stamped ones then I've got nothing for you.
Technical Director
www.infocat.co.uk
holger_b
Posts: 131
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: Planning Analytics 2.0
Excel Version: 2016
Location: Freiburg, Germany

Re: TI process to delete log files: Access denied

Post by holger_b »

Thank you Steve, but that was not the problem.

In the end we thought of a quick and dirty way: Someone created an .exe file for me which executes the "del" command, and we switched the file options of it to "run as administrator", that solved it.
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: TI process to delete log files: Access denied

Post by qml »

@holger_b, do you by any chance keep your TM1 data folder in Program Files? Some recent Windows versions put extra restrictions on this and other system-critical folders.
Kamil Arendt
holger_b
Posts: 131
Joined: Tue May 17, 2011 10:04 am
OLAP Product: TM1
Version: Planning Analytics 2.0
Excel Version: 2016
Location: Freiburg, Germany

Re: TI process to delete log files: Access denied

Post by holger_b »

Thank you, good idea, but we do not. Log files are somewhere on drive D:.
Post Reply