Yeah, I reflexively double quote every path. It’s still stupid though.
Why aren’t you string quoting all of your paths anyway? I’m confused because the vast majority of paths wouldn’t work the way you’re suggesting.
squozenode@lemmy.world 6 months ago
UmeU@lemmy.world 6 months ago
Even something as simple as:
Stops working as intended when your desktop no longer resides at that path.
Also, I have the same functions running on multiple machines with different names so I have to dynamically resolve the path and piece it together using strings.
Simon@lemmy.dbzer0.com 6 months ago
Okay, so if your source path changes, your script stops working? Who knew. Try ([Environment]::GetFolderPath(“Desktop”))
UmeU@lemmy.world 6 months ago
I am using that already, but if I recall, it’s the space in the path ‘\one drive\’ that makes that not work correctly.