LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Bash script to process every file in current dir and sub dirs (https://www.linuxquestions.org/questions/linux-software-2/bash-script-to-process-every-file-in-current-dir-and-sub-dirs-360646/)

BuckRogers01 09-06-2005 04:52 AM

Bash script to process every file in current dir and sub dirs
 
Hi, does anyone know of a script that will do 'function, or whatever I want', to every file in the current dir and sub dirs. This is because I am writing a script which rearranges my music library depending on the IDv3 tags of my MP3 files, I just need a script that repeates and gives the filename of every file in the current dir and sub dirs, so that I can read the IDv3 tags of each file to process them

Any info would be great, Buck

theYinYeti 09-06-2005 05:16 AM

The basic command for that is:
Code:

find ./ -type f -exec function '{}' \;
where {} gets replaced with each found file in turn.

Yves.

Riddick 09-06-2005 07:31 AM

or surely just a clever usage of "*", no?
like:

Code:

function *
will perform the function for everything in the folder you're in...

This may be bad practice though

Riddick 09-06-2005 07:32 AM

Download and install the graphical tool:
"EasyTAG"
It is amazing at doing batch jobs... it sorted out
all of my music!

-Riddick again


All times are GMT -5. The time now is 10:51 PM.