eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

221
active users

#codinghelp

0 posts0 participants0 posts today
stib<p>Hi <a href="https://aus.social/tags/nerds" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nerds</span></a>, if I run a <a href="https://aus.social/tags/powershell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>powershell</span></a> 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.<br>If my script is:<br>```<br>param (<br> [string[]]$inDirs<br>)<br>foreach ($dir in $inDirs){<br> write-host $dir<br>}<br>```<br>and I do<br>```<br>pwsh myscript.ps1 'c:\\some\dir\'<br>```<br>The result is <br>```<br>c:\\some\dir"<br>```<br>How do I get it to unescape (or whatever it's doing) the last slash?<br><a href="https://aus.social/tags/AskFedi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AskFedi</span></a> <a href="https://aus.social/tags/CodingHelp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CodingHelp</span></a> <a href="https://aus.social/tags/pwsh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pwsh</span></a></p>