I have several batch files from my windows installation that I've been using for many years, and I wonder what's the best way to transfer them to a Linux machine, without having to rewrite them as shell scripts. Some of these batch files call DOS programs and some call Win32 console programs. Unfortunately I have a few that has calls to both a DOS and a Win32 console program. The problem is: 1) The DOS programs won't run in Wine, and 2) The Win32 console programs won't run in DOSBox/DOSEmu/etc. I am looking for a single environment that will run both Win32 console and DOS executables, and which can interpret DOS/Windows batch files. Any help is appreciated.
Bamm wrote:> I have several batch files from my windows installation that I've been using for many years, and I wonder what's the best way to transfer them to a Linux machineRewrite them in any real scripting language (shell, perl).
oiaohm wrote:> Wine does have a cmd that can run some. But big but Bamm > > http://tldp.org/LDP/abs/html/dosbatch.html << Rewrite is normally better. Bat is a massively messy language. > > Then there is the evil of the dual format bat bash file. > http://blog.bigsmoke.us/2007/06/11/microsoft-batch-file-meets-bash-shellscript > > There are even better ways of doing that. > > The following is incorrect. > > > The Win32 console programs won't run in DOSBox/DOSEmu/etc > > http://www.japheth.de/HX.html HX extender for dos. > > Still does not change the fact of course. What dos programs what windows programs. Do they have *nix replacement. Converted scripts will work on all processors if they have *nix replacements including inside some nokia phones. Also script will most likely work back on windows threw one means or another. cygwin, andlinux ,openlina.... List goes on.Interesting links! Thanks oiaohm! I'll be studying them. :)
austin987 wrote:> Use wine cmd.exeBtw, can a batch file be passed on as a command line argument to cmd.exe, or do I have to open cmd first and run the batch file from there?
Bamm wrote:> > austin987 wrote: > > Use wine cmd.exe > > Btw, can a batch file be passed on as a command line argument to cmd.exe, or do I have to open cmd first and run the batch file from there?wine cmd /c foo.bat