Re: Batch File to manipulate path and file name




"ebferro" <ebferro@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:104B0630-6314-4D1A-8E1E-63AD63BE9ED8@xxxxxxxxxxxxxxxx
I'm trying to use a batch file to convert some .wav files to .mp3 files
using
a program called switch. All of my .wav files are stored in a directory
on
my network. The files are of the type h:\music\artist name\cd
name\song.wav.
I want to convert all of these files to .mp3 files and store them in
another
subdirectory. The files should be stored in h:\mp3\artist name\cd
name\song.mp3. I know I can use the for /R command to recursively go
through
the h:\music subdirectory. My question is this. I need to pass the
h:\mp3\artist name\cd name portion of the path to switch to tell it where
to
store the output files. How can I manipulate the path of the .wav file to
eliminate the music part of the path and replace it with mp3 and then
remove
the song name from that path since switch assumes that the song name will
be
the same with the .mp3 extension on it? The other question that I've got
is
can I do this manipulation in a batch file before the for /R command so
that
I've got a variable that is of the form h:\mp3\artist name\cd name and
just
pass that variable to switch so that it can use that variable to tell it
where to store the output. Any help that can be offered will be greatly
appreciated.

I think I know what I want to do and I'm sure that it can be done.
However, after reading your note three times I'm still not sure that
I understand your exact aim. An example for each of the two
parts of your question would make things a lot clearer.


.



Relevant Pages

  • need help with mp3s
    ... I am a relative computer dummy. ... I have had something called "switch" ... installed, and I can now convert all of my wav files to mp3, so that ...
    (rec.music.opera)
  • Re: Protecting the system
    ... Two notices, one "press briefly to shut down" pointing at the power button, ... the plug or, if it has a switch, the PSU. ... minimise writes to the flash device which ext3 would be constantly doing ... The other thing I need to store is the system configuration files - ...
    (uk.comp.os.linux)
  • Re: RA-MP3 conversion
    ... exactly fit wat Switch offers, at least if you only ever want to MP3 data. ... location on the BBC servers from where a RTSP-capable program (such as ... than an MP3 of equivalent quality, for one thing), the .ram file isn't it. ...
    (uk.media.radio.archers)
  • Re: More problems with iplayer
    ... link, mplayer it down the line and to wav, then lame it to an mp3. ... How do you do the "Switch it to mp3" part? ... I'm missing something here - the links on the iplayer site give you the rstp: links, but not access to the ram file itself. ... I've just cancelled my first reply because I'd read your post as meaning you were trying to download from the BBC iplayer site, so I redirected you to the iplayer converter site. ...
    (uk.media.radio.archers)
  • Re: RA-MP3 conversion (was: Podcasts - a dearth of)
    ... exactly fit wat Switch offers, at least if you only ever want to MP3 data. ... location on the BBC servers from where a RTSP-capable program (such as ... than an MP3 of equivalent quality, for one thing), the .ram file isn't it. ...
    (uk.media.radio.archers)