Cheking File Size

Post Reply
vishalpoddar90
Posts: 16
Joined: Wed Jun 28, 2017 12:27 pm
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2013

Cheking File Size

Post by vishalpoddar90 » Fri Apr 06, 2018 7:00 am

Dear All,

Is there any function in TI process to check the size of a file. I tried google and tm1 reference guide but couldn't find anything.
If not, is there a way to get the returnvalue from Executecommand().

Thanks.

User avatar
Alan Kirk
Site Admin
Posts: 5816
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: 9.5.2 64 bit moving to 10.2.2
Excel Version: 2010
Location: Sydney, Australia
Contact:

Re: Cheking File Size

Post by Alan Kirk » Fri Apr 06, 2018 7:22 am

vishalpoddar90 wrote:
Fri Apr 06, 2018 7:00 am
Is there any function in TI process to check the size of a file. I tried google and tm1 reference guide but couldn't find anything.
If not, is there a way to get the returnvalue from Executecommand().
"Size" in what sense; rows, bytes, kilobytes...?
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.

Mark RMBC
Regular Participant
Posts: 158
Joined: Tue Sep 06, 2016 7:55 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: Excel 2010

Re: Cheking File Size

Post by Mark RMBC » Fri Apr 06, 2018 11:00 am

If by size you mean bytes,

I have a batch script to get the last modified date of a file, but it can be easily tweaked to get the file size, so the code below:

Code: Select all

wmic datafile where Name="Name of File Path\Name of file.csv" get FileSize >> "Put the output to this file.txt"
I then use the "Put the output to this file" as a data source in a TI to load the value into an admin cube

cheers, Mark

User avatar
macsir
Community Contributor
Posts: 534
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1, SSAS
Version: 9.5 - 10.2
Excel Version: 97 - 2013
Contact:

Re: Cheking File Size

Post by macsir » Mon Apr 09, 2018 12:11 am

Powershell is the way to go rather than TI processes.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/

Post Reply