Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Multiple File renaming with a twist

$
0
0
Hi

I can do simple file renaming but this task is slightly more troublesome
Ive got a guy that gives me multiple .pdf filles in a directory named
something like

Code:

3412345.pdf
4565465.pdf
8534534.pdf

And he also gives me a html file which is tabled with which shows the filenames above and the titles.
E.G
Code:

England|SolarPanels roof|3412345.pdf
Scotland|SolarPanels Garden|4565465.pdf
Ireland|SolarPanels Wall|8534534.pdf

What I want to do is rename all of the files in the directory to match the titles so I want to rename
Code:

3412345.pdf to SolarPanels roof.pdf
4565465.pdf to SolarPanels Garden.pdf
8534534.pdf to SolarPanels Wall.pdf

Is there a way I can do this in a shell script which would be quick n easy?!! I can create a .txt file or whaever is needed to be read as input
Any help would save me a lot of time

Viewing all articles
Browse latest Browse all 16232

Trending Articles