Hi #nerds, if I run a #powershell script that takes a directory or a collection of directories as its arguments, the trailing slash in the directory name turns the following single quote into a double quote using evil Microsoft dark magic somehow.
If my script is:
```
param (
[string[]]$inDirs
)
foreach ($dir in $inDirs){
write-host $dir
}
```
and I do
```
pwsh myscript.ps1 'c:\\some\dir\'
```
The result is
```
c:\\some\dir"
```
How do I get it to unescape (or whatever it's doing) the last slash?
#AskFedi #CodingHelp #pwsh
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
stib (stib@aus.social)'s status on Friday, 04-Jul-2025 13:39:08 JST
stib