Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Last active December 24, 2015 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsakamoto/8a0533ec85cd8717ac2a to your computer and use it in GitHub Desktop.
Save jsakamoto/8a0533ec85cd8717ac2a to your computer and use it in GitHub Desktop.
# 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