-
This post http://powershell.com/cs/blogs/tips/archive/2012/06/05/checking-size-of-downloads-folder.aspx go me thinking about the temp folder. Its one of those areas tucked away in your profile that just seems to get left to grow. Time to...
-
There are a number of new features in PowerShell v3 that while not huge like CIM or workflow are os significant help to the hard pressed administrator. One of these is the Unblock-File cmdlet. If you haven’t updated your help the online version...
-
Question on the forums related to folder sizes and last write time Get-ChildItem -Path "C:\PersonalData\MyBooks\PowerShell and WMI" -Recurse | where { $_ . PSIsContainer } | foreach { $size = Get-ChildItem -Path $_ . FullName | measure -Sum...
-
I was recently left a comment of a post http://richardspowershellblog.wordpress.com/2009/11/30/updating-access-data/ asking about the how to get the count of files in a folder There are a number of solutions including dropping back to the FileSystem object...
-
A question on the forum asked about setting creation date on folders after they have been copied to match the source folder. I created a source folder with three folders and modified the creation dates Set-ItemProperty -Path c:\testsource\folder1 -Name...
-
A question in the forums wanted to get the date a folder was changed on their domain controllers. This is one way to do it $folder = "Common Files" [System.DirectoryServices.ActiveDirectory.Domain] :: GetCurrentDomain ( ) | select -ExpandProperty...
-
Following on from the previous post I was asked if the bit where we set the case on the file names and extension could be done in a select statement. Simple answer is yes Get-ChildItem | where { -not $_ . PSIsContainer } | sort Fullname | select @{ N...
-
A question was left asking about displaying a file listing with the full name in upper case and the extension in lower case. Its one line of PowerShell Get-ChildItem | where { -not $_ . PSIsContainer } | sort Fullname | Format-Table @{ N = "FullName"...
-
split-path works with with UNC paths as well as normal paths PS> $path = " \\UNCserver\TFSBuilds\componenet\v11.1\XS11.1\XS11.1_11.1.0.35 " PS> Split-Path -Path $path -Parent \\UNCserver\TFSBuilds\componenet\v11.1\XS11.1 ...
-
Removing empty folders seems to be a question that crops up on a regular basis. The problem is determining if a folder is empty: it could have subfolders it could have zero length files Both of these cases would register as empty if all we checked was...
-
Saw a question in the forums – running Get-ChildItem and wanted the folder containing the file. Could split PSParent and pick the last element or can use a calculated field Get-ChildItem -Path c:\test -Recurse | select FullName, @{N="Folder";...
-
if we use our get-favourite function to look at the content of favourite files get-favourite | select -f 5 | foreach{""; get-content -Path $_.path} we see this sort of structure [DEFAULT] BASEURL= http://www.bing.com/ [{000214A0...
-
I recently copied my favourites between machines which started me thinking about viewing favourites. Like many people I have generated a lot of favourites over the years – do I really need them all. Don’t know because I don’t know what they are. ...
-
Last time we had got the file names for most of the files but anything in special folders such as the desktop wasn’t displaying properly. We can fix that 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025...
-
I was asked today if it was possible the path to recent files that are shown on the start menu. I thought it was easy until I started digging into it. The files on the start menu are .lnk files and are in a binary format. 001 002 003 004 005...