Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# LICENSE - [The Unlicense](http://unlicense.org/UNLICENSE)
cd (Split-Path ( & { $myInvocation.ScriptName } ) -Parent)
$now = [DateTime]::Now
for ($counter = 1; ; $counter++) {
$dirName = "{0:yyyy-MM-dd}-{1:D3}" -f $now, $counter
if (-not (Test-Path $dirName)) {
md $dirName > $null
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment