Skip to content

Instantly share code, notes, and snippets.

@jeppevammenkristensen
Created March 20, 2014 10:05
Show Gist options
  • Select an option

  • Save jeppevammenkristensen/9660689 to your computer and use it in GitHub Desktop.

Select an option

Save jeppevammenkristensen/9660689 to your computer and use it in GitHub Desktop.
Addition to the powershell profile to make it easy to navigate to the psychical location of one-drive files. Only optimized for windows 8.1
function Cd-OneDrive()
{
$userPath = Join-Path $env:UserProfile 'onedrive'
Write-Warning "Testing ->$userPath"
if (Test-Path -Path $userPath)
{
cd $userPath
}
$userPath = Join-Path $env:UserProfile 'skydrive'
Write-Warning $userPath
if (Test-Path -Path $userPath)
{
cd $userPath
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment