Hi, I have written a simple script to rename a load of files from *.pdf to *_.pdf.
The problem I have is that it can't traverse directories, as I have several hundred directories and I don't fancy running the script manually in each one. I have 3 levels of directories that I need it to look in - basically it just needs to do so recursively.
Here is the script:
for i in *.pdf
j=`echo $i | sed 's/.pdf/_.pdf/'`done
mv $i $j
It works fine when run from within the folder containing some pdf's, but I can't run it from 1 level up, i.e. encompassing a couple of hundred folders each containing 10's of pdf's.
Any help would be greatly appreciated.