<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx</link><description>Guest blogger, Bill Stewart, discusses a Windows PowerShell function to determine folder size.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3573973</link><pubDate>Tue, 21 May 2013 19:15:18 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3573973</guid><dc:creator>R Jason Morgan</dc:creator><description>&lt;p&gt;I wish there was a better way to get folder sizing, the persistent issues with access denied are really ticking me off. &amp;nbsp;It&amp;#39;s not an issue with your script as much as it&amp;#39;s an issue with using get-childitem to enumerate the contents of a folder and then calculating length.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3573973" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3554453</link><pubDate>Fri, 22 Feb 2013 16:07:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3554453</guid><dc:creator>Richie</dc:creator><description>&lt;p&gt;Is there a way to add additional objects from the Get-ChildItem cmdlet in the final output? &amp;nbsp;I would like to include &amp;nbsp;&amp;quot;select-object FullName,CreationTime,LastAccessTime,LastWriteTime&amp;quot; for each directory as well as the Size.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Richie T.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3554453" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3546564</link><pubDate>Thu, 17 Jan 2013 23:56:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3546564</guid><dc:creator>Path truncated </dc:creator><description>&lt;p&gt;Thanks but i can only get 39 characters for the path printed ?&lt;/p&gt;
&lt;p&gt;I expanded the console width no change. I see no &amp;quot;40&amp;quot; size wise in the code. A mystery.&lt;/p&gt;
&lt;p&gt;How can i get a much bigger path ?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3546564" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3545782</link><pubDate>Mon, 14 Jan 2013 21:31:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3545782</guid><dc:creator>IamMred</dc:creator><description>&lt;p&gt;@DarkGnome I do not think it would be an easy tweak. The reason is that I do not see anywhere to get directory depth. I would therefore be reduced to parsing the path -- not very accurate -- or trying to count how many directories deep you go --- or doing recursion and setting the number of recursions.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3545782" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3545772</link><pubDate>Mon, 14 Jan 2013 20:49:18 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3545772</guid><dc:creator>DarkGnome</dc:creator><description>&lt;p&gt;Love this script, but am wondering about a minor tweak: &amp;nbsp;To get it to list only one-to-two levels deep.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3545772" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3532589</link><pubDate>Wed, 14 Nov 2012 18:46:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3532589</guid><dc:creator>Bill Stewart</dc:creator><description>&lt;p&gt;@Brad - yes; just pipe the script&amp;#39;s output to Export-CSV.&lt;/p&gt;
&lt;p&gt;@Cab - the script outputs objects and the default formatter is outputting each object. You can pipe to Format-List or Export-CSV to see all of the data.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3532589" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3526098</link><pubDate>Mon, 15 Oct 2012 16:01:37 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3526098</guid><dc:creator>Cab</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Thank you very much for taking the time to create this, it has been very helpful!&lt;/p&gt;
&lt;p&gt;I just have one issue, which might not be applicable for here but I am running your script from SQL Server Management studion 2008 and when I get the output of the file it truncates the file path if it is longer than 28 characters. I have set my fields in sql to be an nvarchar(2000) but I do not see how it is truncating it.&lt;/p&gt;
&lt;p&gt;Any help would be much appreciated.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Craig&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3526098" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3525817</link><pubDate>Fri, 12 Oct 2012 21:52:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3525817</guid><dc:creator>Brad</dc:creator><description>&lt;p&gt;Is there a way the output from this script could be output into a csv file?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3525817" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3517565</link><pubDate>Sun, 02 Sep 2012 10:14:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3517565</guid><dc:creator>Santosh Bhandarkar</dc:creator><description>&lt;p&gt;Useful&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3517565" width="1" height="1"&gt;</description></item><item><title>re: Getting Directory Sizes in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/25/getting-directory-sizes-in-powershell.aspx#3510124</link><pubDate>Sat, 21 Jul 2012 15:36:41 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3510124</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;@Paolo - you can&amp;#39;t.&lt;/p&gt;
&lt;p&gt;On Vista bnad later many folders are not real. &amp;nbsp;They are placeholders for the system to use th redirect to the new location. &amp;nbsp;You must access the driectories by accessing teh &amp;#39;special folders&amp;#39; variables of teh shell. &amp;nbsp;It is the only way to know where the real drirectory is.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/08/hey-scripting-guy-how-can-query-the-contents-of-a-special-folder-on-a-windows-7-computer.aspx"&gt;blogs.technet.com/.../hey-scripting-guy-how-can-query-the-contents-of-a-special-folder-on-a-windows-7-computer.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;# Get the dektop folder path&lt;/p&gt;
&lt;p&gt;[environment]::GetFolderPath(&amp;#39;desktop&amp;#39;)&lt;/p&gt;
&lt;p&gt;# List all special folder names&lt;/p&gt;
&lt;p&gt;[enum]::GetNames([System.Environment+SpecialFolder])&lt;/p&gt;
&lt;p&gt;You cannot just list and accesss all folders that you find.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3510124" width="1" height="1"&gt;</description></item></channel></rss>