Hi all
Im writing a maintenance TI that checks for Files in the server folder. I can count them, using scan i can define them but is there anyway to get the file size? or second to this any way i can get the folder size as well?
Thanks all
File size in a TI
-
- MVP
- Posts: 3241
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: File size in a TI
Hello there
I'm not sure there's a direct way in TI. If yes, I would like to know about it too.
What I did in the past, was create a VBS file, execute that file with TI, let the VBS create a text file, and pick up the file again in the next TI process.
Wim
I'm not sure there's a direct way in TI. If yes, I would like to know about it too.
What I did in the past, was create a VBS file, execute that file with TI, let the VBS create a text file, and pick up the file again in the next TI process.
Wim
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 141
- Joined: Wed Mar 09, 2011 1:25 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2003 2007 2010 2013
Re: File size in a TI
hi wim,
I too built a Excel VB document to do this however im trying to move away from the need to run macros and automate my Maintenance via chores
I too built a Excel VB document to do this however im trying to move away from the need to run macros and automate my Maintenance via chores
-
- MVP
- Posts: 3241
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: File size in a TI
What I suggested above, is no Excel and macros, and can be automated through chores.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: File size in a TI
You can get a file listing with sizes by issuing a DIR command in a TI process. You can then parse that file in a second TI. There are a bunch of parameter options you can provide to the DIR to get the file in the format you want. To get all the files in a data directory and all subfolders and files you could do this:Darkhorse wrote:Hi all
Im writing a maintenance TI that checks for Files in the server folder. I can count them, using scan i can define them but is there anyway to get the file size? or second to this any way i can get the folder size as well?
Thanks all
Code: Select all
CommandLine = 'cmd /c dir /s *.* >File_Listing.txt';
ExecuteCommand(CommandLine, 0);
-
- Posts: 141
- Joined: Wed Mar 09, 2011 1:25 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2003 2007 2010 2013
Re: File size in a TI
Brilliant i like it
thanks guys
thanks guys
