![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #2 (permalink) |
| Guest | Re: script with spaces in the path On Wed, 15 Nov 2006 11:42:01 -0800, Tim <Tim@discussions.microsoft.com> wrote: >How would you execute a script file that has spaces in either it's parent >path or filename? &"C:\Pro PowerShell\Chapter 18\Hello.ps1" works for a script in my "Chapter 18" folder. Andrew Watt MVP |
| | #3 (permalink) |
| Guest | Re: script with spaces in the path "Andrew Watt [MVP]" wrote: > On Wed, 15 Nov 2006 11:42:01 -0800, Tim > <Tim@discussions.microsoft.com> wrote: > > >How would you execute a script file that has spaces in either it's parent > >path or filename? > > &"C:\Pro PowerShell\Chapter 18\Hello.ps1" > works for a script in my "Chapter 18" folder. > How about from cmd or Run box? i.e. powershell -command &"C:\Pro PowerShell\Chapter 18\Hello.ps1" does not work. |
| | #4 (permalink) |
| Guest | Re: script with spaces in the path On Wed, 15 Nov 2006 14:13:02 -0800, Tim <Tim@discussions.microsoft.com> wrote: >How about from cmd or Run box? i.e. >powershell -command &"C:\Pro PowerShell\Chapter 18\Hello.ps1" >does not work. The following works from CMD.exe and from Run: PowerShell -NoExit -command "&'C:\Pro PowerShell\Chapter 18\Hello.ps1'" Andrew Watt MVP |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBS script with spaces in executable path | Tyler Durden | VB Script | 6 | 6 Days Ago 02:30 PM |
| Re: running a program with spaces in Path with invoke-expression | Kiron | PowerShell | 0 | 04-24-2008 10:41 AM |
| Re: running a program with spaces in Path with invoke-expression | Spider Pig | PowerShell | 0 | 04-24-2008 08:02 AM |
| invoke-expression with .exe that has spaces in its path | Michael Kelley | PowerShell | 1 | 03-30-2007 11:20 PM |
| can't run script from folder containing spaces | delta99 | PowerShell | 3 | 03-07-2007 07:56 AM |