Go-Nextcloud
Sets the working directory to the user's NextCloud folder
#requires -version 5.1
try {
if (-not(Test-Path "~/NextCloud" -pathType container)) {
throw "No 'NextCloud' folder in your home directory - Please install NextCloud"
}
$path = Resolve-Path "~/NextCloud"
Set-Location "$path"
$files = Get-ChildItem $path -attributes !Directory
$folders = Get-ChildItem $path -attributes Directory
"??$path entered (has $($files.Count) files and $($folders.Count) folders)"
exit 0 # success
} catch {
"?? ERROR: $($Error[0])"
exit 1
}This script has no configurable parameters.