Skip to content

Instantly share code, notes, and snippets.

View Cmdr-Keene's full-sized avatar

Shawn Keene Cmdr-Keene

View GitHub Profile
@dhcgn
dhcgn / get-datetaken.ps1
Created November 3, 2023 09:20
Retrieves the date when a file was taken or created with Powershell
<#
.SYNOPSIS
Retrieves the date when a file was taken or created.
.DESCRIPTION
The Get-DateTaken function uses the Windows Shell COM object to access file properties that aren't directly accessible through .NET's System.IO classes. It attempts to retrieve the "Date taken" property of the file. If this property is not available, it retrieves the "Date created" property instead. The retrieved date string is sanitized and parsed into a DateTime object.
.PARAMETER file
The file for which the date taken or created is to be retrieved. This parameter is mandatory.
@alexisnomine
alexisnomine / DocxToPdf.ps1
Created March 7, 2014 09:58
Batch convert docx to pdf with powershell
Param(
[Parameter(Mandatory=$True)]
[string]$FilePath
)
$Files = Get-ChildItem "$FilePath\*.docx"
$Word = New-Object -ComObject Word.Application
Foreach ($File in $Files) {
@alexisnomine
alexisnomine / breadcrumbs.css
Last active October 12, 2020 14:55
Breadcrumb when navigating folders in a Sharepoint 2010 Document Library WebPart. (Pure JS, No jQuery, IE8+) Can be inserted via a "HTML Form Web Part" or referenced in a custom masterpage.
.ms-WPHeader .breadcrumbs{
display:block;
font-style:italic;
}
.ms-WPHeader .breadcrumbs,.ms-WPHeader .breadcrumbs a{
font-size: 0.8em;
color:#D1D1D1;
}