Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a setup.bat file which install some applications and i want to execute it.

This is content of .bat file :

@echo off
Rip_7z.exe x Rip0.7z
del Rip0.7z
Rip_7z.exe x Rip1.7z
del Rip1.7z

I think the Rip_7z.exe file extracts the Rip0.7z and Rip1.7z files and builds the app.

How can I do this in the Ubuntu 11.04 Terminal?

share|improve this question
up vote 22 down vote accepted

You can run DOS batch file through wineconsole:

$ cat ~/.wine/drive_c/file.bat
@echo off
echo Working
$ wineconsole 'C:\file.bat'

You get a new windows similar to this

enter image description here

Also, you can enter an interactive DOS prompt with

wineconsole cmd

You will get:

enter image description here

share|improve this answer

Firstly, Wine won't touch batch files.

Why do you have to do it in a terminal? Just open the directory with naultilus, right click the .7z files and extract. But if you want to do it the hard way, the appriximate conversion of that script is:


7za x RipForGames{0,1}.7z # might want e instead of x
#rm RipForGames{0,1}.7z # commented out in case you want to keep them.

A protip for next time: Try not to announce you're downloading pirated material, in a public forum. It might come back to bite you in the arse one day.

share|improve this answer

You have to run it through cmd eg.: wine cmd /c setup.bat

share|improve this answer
#! /bin/bash

wine RipForGames_7z.exe x RipForGames0.7z
rm RipForGames0.7z
wine RipForGames_7z.exe x RipForGames1.7z
rm RipForGames1.7z

Save this as setup an run it by typing bash setup, and then hitting enter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.