File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11<#
22. SYNOPSIS
3- Sets the working directory to the user's OneDrive folder
3+ Sets the working dir to the OneDrive folder
44. DESCRIPTION
5- This PowerShell script changes the working directory to the user's OneDrive folder.
5+ This PowerShell script sets the current working directory to the user's OneDrive folder.
66. EXAMPLE
7- PS> ./cd-onedrive
8- 📂C:\Users\Markus\OneDrive entered (has 2 files and 0 folders)
7+ PS> ./cd-onedrive.ps1
8+ 📂C:\Users\Markus\OneDrive with 2 files and 0 folders entered.
99. LINK
1010 https://github.com/fleschutz/PowerShell
1111. NOTES
2020 Set-Location " $path "
2121 $files = Get-ChildItem $path - attributes ! Directory
2222 $folders = Get-ChildItem $path - attributes Directory
23- " 📂$path entered (has $ ( $files.Count ) files and $ ( $folders.Count ) folders) "
23+ " 📂$path with $ ( $files.Count ) files and $ ( $folders.Count ) folders entered. "
2424 exit 0 # success
2525} catch {
2626 " ⚠️ Error: $ ( $Error [0 ]) "
You can’t perform that action at this time.
0 commit comments