Compensating time shift / Changing File Creation time using Windows Powershell

I don’t want to blame the time shift 2x a year. At least as long as I do not forget to change the time on my camera as well! As I am doing most of my photography on hikes and geo tag them afterwards, It makes quite a difference if the file creation time is right or wrong.

This year I forgot to change it on the camera and needed to bulk-change the file time later. Luckily this is pretty easy using Windows Powershell and the Windows PowerShell ISE (Integrated Scripting Environment):

$files = Get-ChildItem "C:\Users\[....]\*.arw"
foreach ($f in $files){
    $d1 = [System.IO.File]::GetCreationTime($f.FullName)
    $d2 = $d1.addHours(1)
	[System.IO.File]::SetCreationTime($f.FullName, $d2)
    echo $d1 
    echo $d2
    echo ---

Just copy it into the ISE, execute, done.

How To Quickly delete large folders in Windows

Deleting folders with a huge amount of files can be tedious in Windows Explorer: You might end up in watching a progress bar preparing and deleting a lot of files. Even if you don’t want the files to be moved to trash.

If the files should just be deleted, this can be done easier with the command line:

cd foldername
DEL /F/Q/S *.* > NUL
cd ..
RMDIR /Q/S foldername

That’s it!

A lot of explanation / evaluation and even a Context-Menu-Shortcut can be found at this Ghacks article.