> For the complete documentation index, see [llms.txt](https://notes.tejpratapsingh.com/_/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.tejpratapsingh.com/_/windows-tips/powerselll/rename-all-files-replacing-with-_.md).

# Rename all files, replacing " " with "\_"

```powershell
get-childitem * | rename-item -newname { [string]($_.name).replace(" ", "_") }
```
