Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
For what you're trying to do you need the mogrify program, not convert.
Be careful that unless you specify otherwise, mogrify overwrites the original image, so test it carefully before letting it loose on a directory full of images. And make a backup anyway.
I think IM's globbing is limited to "*" and "?". "%~dp" is a Windows construct for FOR loops. Even if this globbing worked, it wouldn't do what you wanted, as convert can't take a list of filenames and convert each one to a different output. (Well, it could, but with a very complex command.) As Pete says, mogrify would do what you want.
Or you could put the convert inside a Windows for loop:
for %%F in (*.bmp) do "C:\Program Files\ImageMagick-6.5.9-Q16\convert" %%F %%~dpnF.jpg
Moreover, you can see in the output message (unable to open image `'C:\Users\me\Desktop\bmp2jpg\*.bmp'':) that %~dp0 has been properly interprated and replaced by its actual value.
Yes, when used in a batch file, %~dp0 will be translated by the Windows command shell into the directory and path of the batch file. You could then use convert to expand the "*" thus (in a batch file):
convert %~dp0*.bmp %~dp0thing%%03d.jpg
and you will get thing000.jpg, thing001.jpg etc.
But if your output file is *.jpg, convert (version 6.5.8 under Windows) gets tangled up in knots. It seems to make a list of all the output files, and make copies of those.
Under Ubuntu, a similar command (convert *.bmp *.jpg) does the same weird behaviour in 6.4.5.
So does a home-compiled 6.5.9-6.
I wouldn't mind if convert complained about the wildcard destination, but the weird behaviour seems like a bug.
IM convert only allows you to generate one output image under most commands. To process a whole directory of files, you need to use mogrify, then you can use *.jpg to process all jpg files in the directory.
I usually create a new directory, say test2, to receive images from test1.
So in unix
cd test1
mogrify -path /Users/fred/test2 -format png *.jpg
will process all jpg images in test1, converting them to png and put them in test2