# Renaming multiple csv files

**URL:** https://discourse.julialang.org/t/renaming-multiple-csv-files/70005
**Category:** New to Julia
**Tags:** filesystem
**Created:** [October 18, 2021, 9:16pm UTC](https://discourse.julialang.org/t/renaming-multiple-csv-files/70005 "2021-10-18T21:16:07Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [October 18, 2021, 10:17pm UTC](https://discourse.julialang.org/t/renaming-multiple-csv-files/70005/4 "2021-10-18T22:17:25Z")

</div>

A suggestion based on [this solution](https://discourse.julialang.org/t/rename-multiple-files-in-the-folder-with-julia/57976/2):

```julia
dir = raw"C:\Users\jrafa\CSVFILES"
cd(dir)
csvfiles = filter(endswith("pal.csv"), readdir())
for file in csvfiles
    mv(file, file[1:4]*"_"*file[5:6]*"_"*file[7:8]*".csv")
end

```

---

_[View the full topic](https://discourse.julialang.org/t/renaming-multiple-csv-files/70005)._
