Skip to content
Advertisement

Copying files from multiple directories into a single destination directory

There are multiple directories which contain a file with the same name:

JavaScript

Now I want to extract them to another directory, direct_new and with a different file name such as:

JavaScript

How can I do this?

BTW, if I want to put part of the name in original directory into the file name such as:

JavaScript

What can I do?

Advertisement

Answer

This little BaSH script will do it both ways:

JavaScript

And the output:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement