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
#
# V.2: set-clipboard can be run in PS Core and Desktop, no need for set-clipboardText anymore.
#      Note, PS Desktop would have a `set-clipboard -path .` commant
#
#
param (
   [switch] $forwardSlashes
);

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

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

set-clipboard $dir
Github repository scripts-and-utilities, path: /pc.ps1

History

V.2 set-clipboard can be run in PS Core and Desktop, no need for set-clipboardText anymore.

See also

pc pc.pl
Scripts

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759390557, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/tools/scripts/personal/pc_ps1(72): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78