Search This Blog

Thursday, February 17, 2022

Powershell - Fixing my CreationTime with LastWriteTime

Techsmith's SnagIt has long been invaluable to me with all the screen captures that I do.  Up through SnagIt 2021, it has nicely organized all my screen captures by Year/Month within its Library.

Upon upgrading to SnagIt 2022, they converted over all my snag its and they mysteriously dispensed with Library's nice organization.  Now I have a jumbled mess of 6000 captures and I'm so very lost.

The mistake I made after upgrading was that I moved out all the old .SNAG files to a backup location.  The .SNAG files live here for version 2021 and prior:
C:\Users\User\AppData\Local\TechSmith\Snagit\DataStore

I uninstalled 2022, reinstalled 2021, and restored my image files back to it's appropriate DataStore folder.  However, upon copying, Windows changed the Creation Date and now my SnagIt Library thinks all the files are of today's date.  Oh boy.  What a mess!

Luckily, the modification timestamps are intact.  If I can just make the Create Time the same as the Mofication time, then my SnagIt Library would subgroup the files and I'm back to where I was. So, with one powershell command I can fix all my .SNAG files to make the Creation timestamp be the same as the LastWriteTime timestamp:

PS C:\Users\User\AppData\Local\TechSmith\Snagit\DataStore> Get-ChildItem *.SNAG | ForEach-Object{$_.CreationTime = $_.LastWriteTime}

As a side note, if you get this error, this means you need to close out of SnagIt 2021 and retry the powershell command above.

Exception setting "CreationTime": "The process cannot access the file
'C:\Users\User\AppData\Local\TechSmith\Snagit\DataStore\C72D8F24-C2EB-477C-A569-630E25980C4D.SNAG' because it is being used by another process."
At line:1 char:38
+ ... -ChildItem *.SNAG | ForEach-Object{$_.CreationTime = $_.LastWriteTime}
+                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting


Wednesday, February 2, 2022

California Tools Compressor - Valve causing breaker to trip?

These are great oil-less air compressors and they are very quite for what they do.   After years of service, this one started randomly tripping the 20amp breaker but would work most of the time to bring the tank up to pressure.

After taking the head off, I saw that the inlet check valve had a chuck of its metal missing and thereby causing it to leak compressed air.  This probably caused an air-lock situation on one of the pistons which caused the motor to bind up which then tripped the breaker.

These thin pieces of metal are a whopping $40!   But, so far this $500 California compressor has been worth it!   I don't know where the metal piece went but it's working again.