rename folder and files (make the name shorter)

Advanced Renamer forum
#1 : 20/05-17 20:02
Posts: 1

I have a lot of folders with 2 or three files inside.
The name of folder and files inside are the same but I would like to make them shorter.
Folder1 name :a_b - c - d
Files1 name : a_b - c - d.avi
Files1 name : a_b - c - d.jpg
Files1 name : a_b - c - d.txt

Folder2 name :e_f - g - h
Files2 name :e_f - g - h.avi
files2 name :e_f - g - h.jpg
files2 name :e_f - g - h.txt

I would like:
New Folder1 name :a_b - c
New Files1 name :a_b - c.avi
New Files1 name :a_b - c.jpg
New Files1 name :a_b - c.txt

New Folder2 name :e_f - g
New Files2 name :e_f - g.avi
New Files2 name :e_f - g.jpg
New Files2 name :e_f - g.txt

I would like to erase the second ( - ) and all the letters after it, in the name of the folder and files.
Is it a simple way to do it, or should I have to make a script ?
I am a newbie with script, but it’s never too late to make a try, isn’t it?
Anyway, thanks for your help


20/05-17 20:02