Using Powershell, I want to rename files in folders by using the name of the folder that the files are in. So in my C:\\temp directory, there are 3 folders called \'aaa\', \'bb
Try this
$dirname = resolve-path . | split-path -leaf Get-ChildItem -Name | Foreach { Rename-Item $_ ( $dirname + $_ ) }
Be careful not to destroy/delete any of your files. No guarantee.