Renaming multiple csv files

A suggestion based on this solution:

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
2 Likes