If you want to launch wordpad from powershell and account for the space in Program Files, you would do it like this.
&'C:\Program Files\Windows NT\Accessories\wordpad.exe'
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a script that imports a application bundle and adds an application as a dependency. The command is capable of reading "Application bundle" in quotation marks but is unable to read the program when i use spaces. For instance i have a program called "French bundle". If i change the name of the program to Frenchbundle then the command works, But if i use spacebar the command doesn't work for some reason.
This also seems to apply when i use files with - in the name while files with _ in the name works perfectly fine.
Is there any solution for this?.
Update: i solved the issue by specifying both parent directories before French bundle. It turns out my issue had nothing to do with spacebars.
If you want to launch wordpad from powershell and account for the space in Program Files, you would do it like this.
&'C:\Program Files\Windows NT\Accessories\wordpad.exe'
For the record im not looking for a general solution on how to write file names with spaces in. "Application bundle" works just fine and every other command in my script works with spaces, Even when im targeting a specific file.
The same file that didn't work in this script "French bundle" worked perfectly fine with spaces in another command where i imported it.
It's just files after -dependency that cant be read with spaces for some reason, Like i mentioned i can import these files with -dependency if i change the files name to French_bundle or Frenchbundle.
The command understands the quotation marks too since "Frenchbundle" works.