Cheking File Size

Post Reply
vishalpoddar90
Posts: 19
Joined: Wed Jun 28, 2017 12:27 pm
OLAP Product: IBM Planning Analytics
Version: 2.0.76
Excel Version: 365

Cheking File Size

Post by vishalpoddar90 »

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: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Cheking File Size

Post by Alan Kirk »

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
Community Contributor
Posts: 292
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 »

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
MVP
Posts: 782
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: Cheking File Size

Post by macsir »

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