Search notes:

Script: pc.ps1

pc.ps1 copies the path of the current directory into the clipboard. In order to copy the path with forward slashes, the -forwardSlashes (or -f) switch can be used:
PS C:\users\rene> pc
PS C:\users\rene> pc -f
param (
   [switch] $forwardSlashes
);

$dir = (get-item .).ToString()

if ($forwardSlashes) {
   $dir = $dir -replace '\\', '/'
}

if ($psEdition -eq 'Desktop') {

  $dir | set-clipboard

}
else {
# clipboardText needs to be installed:
#    install-module -name ClipboardText
  $dir | set-clipboardText
}
Github repository scripts-and-utilities, path: /pc.ps1

See also

pc pc.pl
Scripts

Index