![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Set-Content : The given path's format is not supported. Does Set-Content not support PSDrive paths? Or am I doing something wrong? See Below for an example... PS ps:\> New-PSDrive -Name test1 -PSProvider FileSystem -Root "C:\psscripts\" Name Provider Root CurrentLocation ---- -------- ---- --------------- test1 FileSystem C:\psscripts\ PS ps:\> Set-Location test1: PS test1:\> "This is a test string" | set-content -path "test1:\testfile.txt" Set-Content : The given path's format is not supported. At line:1 char:38 + "This is a test string" | set-content <<<< -path "test1:\testfile.txt" Set-Content : The given path's format is not supported. At line:1 char:38 + "This is a test string" | set-content <<<< -path "test1:\testfile.txt" PS test1:\> -- gaurhoth http://gaurhothw.spaces.live.com/ |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Set-Content : The given path's format is not supported. check that the file test1:\testfile.txt exists. it worked for me -- $hay http://scriptolog.blogspot.com "Gaurhoth" <gaurhoth@live.com> wrote in message news:uaK69VQOHHA.324@TK2MSFTNGP06.phx.gbl... Does Set-Content not support PSDrive paths? Or am I doing something wrong? See Below for an example... PS ps:\> New-PSDrive -Name test1 -PSProvider FileSystem -Root "C:\psscripts\" Name Provider Root CurrentLocation ---- -------- ---- --------------- test1 FileSystem C:\psscripts\ PS ps:\> Set-Location test1: PS test1:\> "This is a test string" | set-content -path "test1:\testfile.txt" Set-Content : The given path's format is not supported. At line:1 char:38 + "This is a test string" | set-content <<<< -path "test1:\testfile.txt" Set-Content : The given path's format is not supported. At line:1 char:38 + "This is a test string" | set-content <<<< -path "test1:\testfile.txt" PS test1:\> -- gaurhoth http://gaurhothw.spaces.live.com/ |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Set-Content : The given path's format is not supported. Hi, Looks like a bug to me. I can reproduce the behaviour you describe with set-content. As Shay says it works if the file already exists. The problem exists when you use test1: in the path or are in test1: and use set-location. Same problem seems to exist, on initial testing, with add-content. Do you have access to Connect to report the bug? Andrew Watt MVP On Mon, 15 Jan 2007 19:30:12 -0500, "Gaurhoth" <gaurhoth@live.com> wrote: >Does Set-Content not support PSDrive paths? Or am I doing something wrong? See Below for an example... > >PS ps:\> New-PSDrive -Name test1 -PSProvider FileSystem -Root "C:\psscripts\" > >Name Provider Root CurrentLocation >---- -------- ---- --------------- >test1 FileSystem C:\psscripts\ > > >PS ps:\> Set-Location test1: >PS test1:\> "This is a test string" | set-content -path "test1:\testfile.txt" >Set-Content : The given path's format is not supported. >At line:1 char:38 >+ "This is a test string" | set-content <<<< -path "test1:\testfile.txt" >Set-Content : The given path's format is not supported. >At line:1 char:38 >+ "This is a test string" | set-content <<<< -path "test1:\testfile.txt" >PS test1:\> > > >-- > >gaurhoth >http://gaurhothw.spaces.live.com/ |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Audio format is not supported by the current application. | Vista music pictures video | |||
| file format is not supported | Vista music pictures video | |||
| JPEG format not supported | Vista General | |||
| Tab expansion on path's with square braces is broken | PowerShell | |||
| Weirdness with get-content | replace | set-content - file content is deleted!! | PowerShell | |||