Bash script - cd to unknown directory
I have a series of scripts I am using to turn CD's into FLAC files.
The first one gets the album name and track names from the internet and then rips the CD to WAV using cdparanoia.
I have another script that will convert the WAV files into flac files using my cluster.
The problem I have is that I need to 'cd' to the folder containing the WAV files but the name is different each time as it is based on the album name.
I have tried piping ls and cd etc but am getting nowhere!!!
What I would like is a script that does the following.
changes to (for exampe) /home/chris/flactemp/albumname
I can then run the encoding script and them move the folder in to a completed area.
Any help would be appreciated.