Book, tab and the rest.

OK, I finally decided to buy myself present for the saint’s day. PowerShell 2.0 TFM. Paperback will arrive around May, or June… It could be quicker but I prefer to spend money on books rather than on delivery. 😉

Today I’ve also noticed that TAB is really annoying when it comes to tabbing thru hidden folders. Simply because it ignores them. I’ve googled a bit for it and found out that TabExpansion is nothing more than a function. Pretty long one… 😉

(get-command TabExpansion).definition.length 
10725

And I guess the reason why it’s not able to see my hidden folders is that it uses Resolve-Path, which has no –Force parameter (one that is necessary to get hidden folders while using Get-ChildItem). But I’m not 100% sure, after all I’m not the author of this function. 😉 Sad if you really need to use hidden folders from time to time and they have spaces in names (Local Settings would be a good example).

There are 2 possible options now: try again to work with PowerTab (first time I’ve tried to use it it simply didn’t work out for me) or try different approach with folders/ files tab expansion by re-writing TabExpansion function. Yak. ;(

Meanwhile I got another one-liner to get total size of current folder and subfolders:

 
"Total size: {0:0,0.00} MB" -f ( (ls * -r -fo | measure length -s).sum / 1MB )

Now I know where/why all of my free disk space disappeared. 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s