![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 |
| | #1 (permalink) |
| Guest | Out-File -Force doesn't seem to work as advertised I'm having a bit of trouble with Out-File, from Get-Help Out-File -detailed: -force <SwitchParameter> Overrides restrictions that prevent the command from succeeding, just so the changes do not compromise security . For example, Force will override the read-only attribute or create directories to complete a file path, but i t will not attempt to change file permissions. However: PS C:\temp> out-file -FilePath .\foo\bar.txt -InputObject "String" -Force Out-File : Could not find a part of the path 'C:\temp\foo\bar.txt'. At line:1 char:9 + out-file <<<< -FilePath .\foo\bar.txt -InputObject "String" -Force Am I doing something wrong, or is this something I should submit to connect? ^_^ ~Clint |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Out-File -Force doesn't seem to work as advertised Looks like either a bug or something they intended to do, documented, and didn't get to . Take yer pick. But you're right, it won't create the path for you.-- Don Jones Windows PowerShell MVP Founder: www.ScriptingAnswers.com Co-Author: "Windows PowerShell: TFM" "Clint Bergman" <clint@psd267.wednet.edu> wrote in message news:O4bqp9%23kHHA.1624@TK2MSFTNGP06.phx.gbl... I'm having a bit of trouble with Out-File, from Get-Help Out-File -detailed: -force <SwitchParameter> Overrides restrictions that prevent the command from succeeding, just so the changes do not compromise security . For example, Force will override the read-only attribute or create directories to complete a file path, but i t will not attempt to change file permissions. However: PS C:\temp> out-file -FilePath .\foo\bar.txt -InputObject "String" -Force Out-File : Could not find a part of the path 'C:\temp\foo\bar.txt'. At line:1 char:9 + out-file <<<< -FilePath .\foo\bar.txt -InputObject "String" -Force Am I doing something wrong, or is this something I should submit to connect? ^_^ ~Clint |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Advertised Shortcuts in a setup and deployment project | Pat | .NET General | 3 | 03-27-2008 02:37 PM |
| Force Vista Downloads to ask me where to store the file | HFL | Vista General | 5 | 12-19-2007 01:04 AM |
| Multi-boot setup process does not work as advertised in FAQs | Aymincendiary | Vista installation & setup | 5 | 08-27-2007 07:47 AM |
| Should Get-Item . [-Force] always work? | Roman Kuzmin | PowerShell | 1 | 04-06-2007 04:48 AM |
| Cyborg 3d force and Microsfts don't work | John | Vista General | 0 | 02-24-2007 07:57 AM |