.bat files help :(

Asked by ThisIsAnAccount

i need help with . bat files
when i try to run .bat files
it only gets an error and
please i need help with
how to make me use .bat
files :)
please help me

terminate

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ryan Kavanagh (ryanakca) said :
#1

Hi,
I believe you will need to install a DOS emulator like DOSEMU. (Install the 'dosemu' package).

Beyond that, I can't really help you.

Have a happy new year,
Ryan

Revision history for this message
ThisIsAnAccount (thisisanaccount-deactivatedaccount) said :
#2

how to use dosemenu? i got it
but i cant get it work

Revision history for this message
ThisIsAnAccount (thisisanaccount-deactivatedaccount) said :
#3

how to use dosemenu? i got it
but i cant get it work

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

If it is to manipulate linux files etc you will need to translate them to bash scripts to run on linux. BAT files are for windows and dos systems.

Revision history for this message
ThisIsAnAccount (thisisanaccount-deactivatedaccount) said :
#5

how do i do that?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

You will need to analyse the commands and translate

Revision history for this message
delvalle26 (bassaf) said :
#7

You can for example open your .bat files with gedit (Text Editor in Applications -> Accessories)

There you will see the contents and what the file is trying to do. If you want to re-write whatever the .bat does then as advised above you can make an equivalent or better script with bash.

Here is a table with equivalent commands to help you translate.

http://tldp.org/LDP/abs/html/dosbatch.html

You could also run the .bat you want with dosbox (it's an emulator more targeted to games though...)

sudo apt-get install dosbox

Then right click your .bat, Open With, and choose dosbox from the list (or click "Use a custom command" and type dosbox) and it will run your bat file.

I don't have experience with dosemu, so I'm recommending dosbox out of familiarity.

Revision history for this message
ThisIsAnAccount (thisisanaccount-deactivatedaccount) said :
#8

but can somone help me with how to make the run.bat because i have no idea of what to type in there?
it works when i click run.bat with dosbox but it says illegal command in the dosbox?

Revision history for this message
delvalle26 (bassaf) said :
#9

.bat files just contain text. You can make one in any standard text editor.

What do you want your "run.bat" to do? Are you making this file from scratch?

As .bat (short for batch) they were used mostly with DOS in the 1980's. If your goal is to make these files, and use them in a DOS emulator or Windows environment, then you will need to search for dos batch scripting tutorials, and maybe sites dedicated to things like freeDOS.

Here is the wikipedia entry on them
http://en.wikipedia.org/wiki/Batch_files

If you are interested in making shell scripts for Linux and Unix systems, as suggested, learn BASH scripting instead, it is much more robust and useful.

http://tldp.org/LDP/Bash-Beginners-Guide/html/

Hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask ThisIsAnAccount for more information if necessary.

To post a message you must log in.