$file=Get-ChildItem C:\work\*.txt -Name

foreach($list in $file){
	$list2 = $list -replace ".txt",""
	Rename-Item $list -newName $list2#mae.txt
}




$f = (Get-Content aaa.txt) -as [string[]]
foreach ($l in $f) {
    if ($l -like "*#"){
	$ll = $l
	$ll = $ll -replace "#",".txt"
	Rename-Item aaa.txt -newName $ll
    }
}