From 5b8766d233782cb37a068ff61fca908888cb3ae1 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Tue, 8 Jul 2025 16:04:26 +0200 Subject: [PATCH] Updated cd-sync.ps1 --- scripts/cd-sync.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/cd-sync.ps1 b/scripts/cd-sync.ps1 index 66ef5686..2f5b0512 100755 --- a/scripts/cd-sync.ps1 +++ b/scripts/cd-sync.ps1 @@ -2,10 +2,10 @@ .SYNOPSIS Sets the working directory to the user's Sync folder .DESCRIPTION - This PowerShell script changes the working directory to the user's Syncthing folder. + This PowerShell script changes the current working directory to the user's Syncthing folder. .EXAMPLE PS> ./cd-sync.ps1 - 📂C:\Users\Markus\Sync entered (has 2 files and 0 folders) + 📂C:\Users\Markus\Sync with 2 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -14,15 +14,15 @@ try { if (-not(Test-Path "~/Sync" -pathType container)) { - throw "No 'Sync' folder in your home directory - is Syncthing installed?" + throw "Your home directory has no 'Sync' folder yet - Please install Syncthing." } $path = Resolve-Path "~/Sync" 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)" + "📂$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 }