in reply to Double quote problem

Whether this is even possible, much less how to do it, depends on which version of DOS you have and specifically which command interpreter. (What does it say if you type VER at the prompt?)

Assuming what you have is either really MS-DOS as such or the "DOS" that's included in Windows 9x/Me (not e.g. the "DOS" included in Windows XP, which is quite different), your command interpreter is almost surely command.com, and you should see the documentation (such as it is) for that. Depending on your installation, you can *probably* get help for this using the help command (i.e., type HELP at the prompt), though I don't recall how detailed the help for <Command> or whether it goes into quoting. If not, you might be able to find an old DOS manual someplace. I have one at home from ITT DOS that I could consult when I get home. If you don't find the answer in the next several hours, /msg me with a reminder to look at that.

I believe that in DOS versions 5 and later and all versions of Windows 9x/Me what you want to do is (just barely) possible, but the syntax is a bit weird and I no longer recall the exact details. (I haven't done serious BATch programming since I started using QBASIC circa 1995, and I quit using QBASIC very much after I got comfortable with elisp circa 2001; these days I do most stuff in Perl.)

You might be better served to install an alternative command processor, such as 4DOS (which is shareware) or bash (which is free from delorie.com last I checked -- look for DJGPP). If what you're using is not really DOS (e.g., if you're really using the "MS-DOS Prompt" in Windows), then there are additional options available to you, such as Cygwin; I think there's also a mingw32 port of bash someplace, which might be easier for you to integrate into your existing environment.

Another option that is available to you regardless is to replace the BAT file with a Perl script that subsumes its functionality. This is probably what I would do in your shoes. If you post the BAT file here, I can probably help you translate it to Perl.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
  • Comment on Re: Double quote problem, Pls. help, Here is the complete question
  • Download Code