Monday, 1 December 2014

Antec ISK 100 / ISK 110 HTPC Chassis

The Antec ISK 100 (now superseded by the ISK 110) HTPC chassis is a worthwhile consideration for HTPC enthusiasts. It measures only 222 x 78 x 212 mm making it small enough to be mounted on the back of a LCD display that has accessible VESA mounting holes.
isk100-11
A small desktop stand and VESA mount adapter (not shown) are included with the case.
isk100-4
As you can see it is a very compact case that will fit low profile Mini-ITX boards. The case is supplied with an external mains adapter similar to the type provided with a laptop, which produces an output of 19V. The internal power supply board which can be seen inside the top of the chassis converts this into the standard motherboard voltages. There is also space inside the chassis for a very slim fan as can be seen, and for up to two 2.5” HDDs under the motherboard (accessible via a removable side panel). The back panel takes standard I/O shields.
install1
I will be interested to see if the Gigabyte boards I have will fit inside this chassis and approximately what power usage they normally have. Hopefully they can be put into this chassis so that I can make a nice portable HTPC at home, or a tiny computer for work.
Some reviews
UPDATE: I have checked and found my existing Mini-ITX based system with the Gigabyte GA-350N WIN8 board consumes no more than 50 watts from the mains, running off an old inefficient desktop power supply and driving a desktop HDD. I expect the internal power usage to be in the range of 30-35 watts, well within the 80 watts or so that the internal power supply in this chassis will be able to produce.

UPDATE2: I was pleasantly surprised to find there are a considerable range of Mini-ITX boards made, many of which have a CPU socket instead of an embedded chip. Still, the onboard unit was significantly cheaper and has done everything needed of it.

Sunday, 30 November 2014

Supporting my bulk rename with PowerShell (2)

So the script got to be more sophisticated and can now create folders if they don’t exist. What pleases me about PS is that it has a full range of file handling functions built right into it and doesn’t require extensions to do this kind of thing I am doing with it.

The bulk rename has taken all day because it is necessarily slow and tedious when dealing with 65,000 images. In the process I have crashed IrfanView many times and discovered several bugs in it. I could have used something else but stuck with IV because it is such a powerful piece of software that ends up getting used for a lot of things that I do with photos.

Key PS cmdlets called:
  • Get-ChildItem is the function that looks up all the filenames that are in a directory path.
  • Test-Path tells us if a folder path exists.
  • Move-Item moves a file from one place to another
  • New-Item creates a new directory.
There are a few things in PS that take some getting used to and easily the biggest is the comparison operators which can be seen in the If statements. The biggest gain I have made in PS today is actually being able to write a multiline script which (incredibly) I had no idea how to do this morning. I have used a lot of PS commands to do Office365 stuff but never got around to putting the key commands into a script so they don’t have to be typed over and over. Well now I know how to do that…

Putting the Gigabyte video card in the computer is already proving its worth, mainly in better display outcomes. The biggest advantage of using an external card is to free up onboard memory that is normally shared with onboard graphics chips. I don’t know that that necessarily makes a big difference here. It is simply that the Gigabyte drivers are better than Intel’s that is likely to make the main improvement for me with this PC.

$photonames = Get-ChildItem -Path "D:\users\kahuk_000\Pictures\Photos"
foreach($filename in $photonames)
{
    if ($filename.Attributes -ne "Directory")
    {
        if ($filename.Length -ge 10)
        {
            $folderyear = $filename.Name.Substring(0,4)
            if ($folderyear -ge 1980)
            {
                if ($folderyear -le 2014)
                {
                    $foldermonth = $filename.Name.Substring(4,2)
                    $folderday = $filename.Name.Substring(6,2)
                    $foldername = $folderyear + "_" + $foldermonth + "_" + $folderday
                    $foldername
                    if ($folderyear -eq 2014)
                    {
                        $folderpath = "D:\users\kahuk_000\Pictures\Photos\" + $foldername
                    }
                    else
                    {
                        $folderpath = "D:\users\kahuk_000\Pictures\Photos\" + $folderyear + "\" + $foldername
                    }
                    if ((Test-Path $folderpath -pathtype container) -eq $true)
                    {
                        $filename.Name
                        Move-Item $filename.FullName $folderpath
                    }
                    else
                    {
                        New-Item $folderpath -type directory
                        Move-Item $filename.FullName $folderpath
                    }
                     
                }
            }
        }
    }
}

Saturday, 29 November 2014

Supporting my bulk photo rename with Powershell

As I wrote in my last post PowerShell is a very powerful scripting language that can do a lot of stuff in a Windows environment. I spent a bit of time hacking this script together to support my bulk photo rename. Briefly put the steps in the bulk photo rename were:
  • extract the photos from their existing folders by doing a search in the Photos folder
  • Segregate the photos into different subfolders depending on which camera they came from
  • Perform the bulk rename using the new name pattern YYYYMMDD-HHMMSS_cam_#$O (IrfanView)
  • Move everything back into their existing folders again.
The last step is where Powershell came in. Firstly the folder names were generally of the form YYYY_MM_DD and secondly the task of splitting up manually the 65,000 photos into numerous folders when often there might only be less than 10 images per folder was always going to be a slow and arduous task. I have nine years of digital photos with at least 1000 folders, probably more like 2000.

The piece of PowerShell script that has accomplished this is listed below. I didn’t need to write it in PowerShell; there are plenty of scripting language options in Windows. However I chose PowerShell because of its flexibility and functionality and because I need to learn more about it to use it in the course of my everyday work.
$photonames = Get-ChildItem -Path "D:\users\kahuk_000\Pictures\Photos"
foreach($filename in $photonames)
{
    if ($filename.Attributes -ne "Directory")
    {
        if ($filename.Length -ge 10)
        {
            $folderyear = $filename.Name.Substring(0,4)
            if ($folderyear -ge 1980)
            {
                if ($folderyear -le 2014)
                {
                    $foldermonth = $filename.Name.Substring(4,2)
                    $folderday = $filename.Name.Substring(6,2)
                    $foldername = $folderyear + "_" + $foldermonth + "_" + $folderday
                    $foldername
                    $folderpath = "D:\users\kahuk_000\Pictures\Photos\" + $foldername
                    if ((Test-Path $folderpath -pathtype container) -eq $true)
                    {
                        Move-Item $filename.FullName $folderpath
                    }
                     
                }
            }
        }
    }
}
So basically this script reads all the filenames in the Photos folder. It goes through each one in turn and checks to see it is a filename then it does a few checks to determine if the filename contains a valid year. With that completed it then extracts the parameters needed to make a valid directory name. It is then a simple matter of looking up the directory name and then moving the photo into that folder.

And that is what scripting is great for, automating day to day tasks and making our lives easier.