Just a word of practical advice. If you really "need" a solution and don't have time to wait for someone else to take of their own time to help you with your problem, try doing a search on google for something like:
[QUOTE]script to remove extension from filename[/QUOTE]
Unless it's a permissions issue (where you can't delete the folders as the user that runs the batch file) is it possible that you're trying this at the command line as proof-of-concept for the batch file.
If you're doing command line testing, although the variable MUST be %%A in your batch file, it has to be %A when run from the command line (why? I haven no idea ;)
Volume in drive C has no label.
Volume Serial Number is F08F-D325
I'm using FreeBSD 4.1 right now and got it to work by just wrapping the regular expression in quotes. It may be that your shell is interpreting the * character before it passes it to tar:
[QUOTE] # tar xvf bin.tar "perl"
The example above is what I used to test quickly and it failed without the quotes.
Let me know if that doesn't work. We've got some AIX boxes I can specifically try this on tomorrow. Also, if this doesn't work, try the "-L" option and put your string in a file. A bit of a pain, unless you want to match 100 unique files and don't want to type them on the command line, but will probably work, also