Function GetFileNames([string]$path, [string]$outputFile) {
$list = Get-ChildItem $path -Recurse
$list | Select-Object FullName | Export-Csv $outputFile -Encoding UTF8
}
GetFileNames ".\" "C:\Output.csv"
-------------------------
[color=#000000]_PS K:\> + $list = Get-ChildItem $path -Recurse_[/color]
[color=#FF0000]At line:1 char:1
+ + $list = Get-ChildItem $path -Recurse
+ ~~~~~~~~~
The assignment expression is not valid. The input to an assignment operator must
be an object that is able to accept as
signments, such as a variable or a property.
+ CategoryInfo : ParserError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidLeftHandSide[/color]
_PS K:\> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~_
[color=#FF0000]At line:1 char:2
+ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~
Missing expression after unary operator '+'.
At line:1 char:13
+ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '~~~~~~~~~~~~~~~~~~~~~~~~~~~~' in expression or statement.
+ CategoryInfo : ParserError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
[/color]
_PS K:\> ion_
[color=#FF0000]ion : The term 'ion' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:4
+ ion
+ ~~~
+ CategoryInfo : ObjectNotFound: (ion:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException[/color]
_Original-(ERROR Polish)_
PS K:\> At line:2 char:11
Nieprawidłowe polecenie.
Polecenia i programy usługi planowania poleceń AT do uruchomienia na
komputerze o określonej godzinie i dacie. Usługa Harmonogram musi być
uruchomiona, aby używać poleceń AT.
--
<http://forum.pspad.com/read.php?2,63235,63266>
PSPad freeware editor http://www.pspad.com