New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

How to execute *.bat file in Mac


Post Reply New Thread Subscribe

 
Thread Tools
Camy

 
Member Since: Aug 13, 2013
Posts: 2
Camy is on a distinguished road

Camy is offline
Hi,

How will I run a *.bat files in Mac?
I am not at all a Mac Savvy, Would highly appreciate, If any one can provide me with the step by step instruction to execute bat files in Mac.PFB the contents of my bat files

Code:
echo 
Running ConfigureTests.py  to get the selections regarding the test cases to be executed

ConfigureTests.py

echo Now, the configurations are saved to TestConfig.txt file.

echo Please ensure that squishserver  is running before starting the automated testing

echo To start squishserver cd to the squish bin folder in a separate command prompt window and then type squishserver Example:  "cd I:\squish-4.0.2-qt47x-win32-msvc8\bin\    and then squishserver"

runTests.py

echo Please check I:\Test Results\index.html to examine the Test Execution Report
Thanks in advance,
Camy
QUOTE Thanks
TattooedMac

 
TattooedMac's Avatar
 
Member Since: May 19, 2009
Location: Waiting for a mate . . .
Posts: 7,809
TattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant future
Mac Specs: 21" iMac 2.9Ghz 10.9.4 13"MBP 2.9Ghz i7 Yosemite 10.10 ~ iPhone5 iOS 8 ~ iPad Mini iOS 8 ~ ATV3 6.1

TattooedMac is offline
From what i know a .bat file is only a windows batch file script. A .bat file should not be able to run on a Mac at all. They are specific windows commands that make them.

So your options are to run Windows in a VM or via Bootcamp.

Why is it that you need to run a .bat file on your Mac ?

Or you can buy CrossOver for Mac, and try this

Start CrossOver, if it's not already running
Menu Bar -> Programs -> Run Command...
Select the bottle to use - for you this would be the bottle you're installing the game in
Click Browse and find your BAT file
Click Run

I cant guarantee anything that it will work, but from what i have read, the best and easiest way is to run a VM or Bootcamp for Windows and executing a .bat file, especially if your trying to get it into a game.

CogFrog Studio's ~ Photography, Apps and Web Development
Dont forget to use the Reputation System if someone has helped you out !!!
Arguing with a zealot is only slightly easier than tunneling through a mountain with your forehead!!!!!
QUOTE Thanks
Camy

 
Member Since: Aug 13, 2013
Posts: 2
Camy is on a distinguished road

Camy is offline
coz I need to run an application in mac,I used to call that application by running a particular bat file from command mode in windows.Is there a way to change *.bat file to *.bash file?
QUOTE Thanks
TattooedMac

 
TattooedMac's Avatar
 
Member Since: May 19, 2009
Location: Waiting for a mate . . .
Posts: 7,809
TattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant future
Mac Specs: 21" iMac 2.9Ghz 10.9.4 13"MBP 2.9Ghz i7 Yosemite 10.10 ~ iPhone5 iOS 8 ~ iPad Mini iOS 8 ~ ATV3 6.1

TattooedMac is offline
Not sure it can be done as its a Windows executable file but have a look at this . . . . Is there a way to run a .bat file on a mac? - Yahoo! Answers

PS What Program as there might be a Mac equivalent ??

CogFrog Studio's ~ Photography, Apps and Web Development
Dont forget to use the Reputation System if someone has helped you out !!!
Arguing with a zealot is only slightly easier than tunneling through a mountain with your forehead!!!!!
QUOTE Thanks
cwa107

 
cwa107's Avatar
 
Member Since: Dec 20, 2006
Location: Middletown, Pennsylvania
Posts: 26,578
cwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond reputecwa107 has a reputation beyond repute
Mac Specs: 15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD

cwa107 is offline
Let's assume you're Chinese and don't speak a lick of English.

Let's further assume that you need to do a task that consists of several steps, each with very specific instructions.

Now, someone hands you directions for that task and they are written in.... you guessed it... English. That's not going to work, will it?

That's what you're looking at here. .bat files are MS-DOS batch files. OS X, being based on UNIX, has no idea what to do with a .bat file. And just as you can't change the name of the English instructions mentioned above and have it understandable in Chinese, you can't simply change the extension on the .bat file and have it recognized by OS X.

That said, there are many different ways to script automated solutions with OS X. The easiest of which is Automator, which is built right into OS X (look in your Applications folder). There is also AppleScript. And if for whatever reason, you want to delve even deeper into scripting, there you can do shell scripting. An excellent guide is available here.

What you need to do next is to decipher that .bat file and find out what it actually does. Break it out into vey basic steps. Then, translate those actions into your scripting solution of choice, depending on which is most appropriate.

Hope that makes sense.

Liquid and computers don't mix. It might seem simple, but we see an incredible amount of people post here about spills. Keep drinks and other liquids away from your expensive electronics!
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,600
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
The BATch file is very trivial in what it does, converting it to a BASH script is as simple as

Code:
#!/bin/bash

echo  "Running ConfigureTests.py  to get the selections regarding the test cases to be executed"

./ConfigureTests.py

echo "Now, the configurations are saved to TestConfig.txt file."
echo "Please ensure that squishserver  is running before starting the automated testing"
echo "To start squishserver cd to the squish bin folder in a separate command prompt window"
echo "and then type squishserver:"
echo "Example:  cd I:\squish-4.0.2-qt47x-win32-msvc8\bin\    and then squishserver"

./runTests.py

echo "Please check I:\Test Results\index.html to examine the Test Execution Report"
However, this will do nothing for you for a couple of reasons. You need this Squishserver to be available on OS X. If you don't have that, you cannot proceed. You might have to modify the two python scripts minimally to set the correct path to the Python interpreter..

Open up the Terminal (Applications->Utilities->Terminal) and type
Code:
which python
This should return a valid path name as opposed to just returning with no output. If you get a valid path, then that's the path you want to use in your python scripts..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks

Post Reply New Thread Subscribe


« Contacts Group | step-by-step help transferring mac to windows »
Thread Tools

Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
C++ Character Encoding in Mac manis OS X - Development and Darwin 1 01-16-2013 08:05 PM
Finder won't start laurag OS X - Operating System 5 04-13-2012 05:46 PM
OS 10.7 Lion feature/rumour roundup the8thark Apple Rumors and Reports 44 08-17-2011 02:03 PM
Mac Songs The mac 13 Switcher Hangout 7 05-06-2010 12:35 AM
Need to know how much RAM your Mac can hold? iLaugh Other Hardware and Peripherals 6 12-13-2009 01:49 PM

All times are GMT -4. The time now is 12:53 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?