Adding text to txt file for each file name with string concatenation in Powershell : i need to do fill a txt in a context directory opened with shift + right click, like the following code:

    $dir=Get-Location; gci $dir | ForEach-Object {$temp=$_.Name; ";"+$temp > test.txt}

 Thanks