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?" :)

Can you run .bat files on a mac?


Post Reply New Thread Subscribe

 
Thread Tools
tomelk31

 
Member Since: Jul 20, 2011
Posts: 42
tomelk31 is on a distinguished road

tomelk31 is offline
I have batch file i need to run in terminal. I have tried running it in terminal but it didn't work. Is there anyway of doing running this? Or is it a windows only file?
QUOTE Thanks
louishen

 
louishen's Avatar
 
Member Since: Oct 22, 2007
Location: London
Posts: 8,892
louishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant future
Mac Specs: Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver

louishen is offline
Windows only (well, more accurately a DOS file)

But what is the BAT file designed to do, its function could probably be replicated on the mac

Member of the Month September 2008 & August 2012 | Found advice useful? use the rep system
QUOTE Thanks
tomelk31

 
Member Since: Jul 20, 2011
Posts: 42
tomelk31 is on a distinguished road

tomelk31 is offline
Ok thanks, It is used as a emulator for Linux for a University project I am doing so will have to use windows for it!
QUOTE Thanks
louishen

 
louishen's Avatar
 
Member Since: Oct 22, 2007
Location: London
Posts: 8,892
louishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant future
Mac Specs: Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver

louishen is offline
You want to run linux on a mac then?

Member of the Month September 2008 & August 2012 | Found advice useful? use the rep system
QUOTE Thanks
tomelk31

 
Member Since: Jul 20, 2011
Posts: 42
tomelk31 is on a distinguished road

tomelk31 is offline
It is a project which is supposed to get us used to linux commands. Their is no GUI and just using commands to see what the outcomes are.
QUOTE Thanks
louishen

 
louishen's Avatar
 
Member Since: Oct 22, 2007
Location: London
Posts: 8,892
louishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant future
Mac Specs: Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver

louishen is offline
You could us terminal which is just UNIx or install ubuntu in a VirtualBox virtual machine to use linux

Member of the Month September 2008 & August 2012 | Found advice useful? use the rep system
QUOTE Thanks
cwa107

 
cwa107's Avatar
 
Member Since: Dec 20, 2006
Location: Middletown, Pennsylvania
Posts: 26,439
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
Quote:
Originally Posted by tomelk31 View Post
It is a project which is supposed to get us used to linux commands. Their is no GUI and just using commands to see what the outcomes are.
That's pretty funny.

So, a batch file is just a series of DOS commands structured in such a way as to perform a series of actions. My guess is your .bat file probably has a series of prompts and responses that make the Windows Command Prompt look like Linux.

What is really interesting about this is that your Mac essentially uses the same shell as many Linux distributions (bash). So, you can use the commands for real right on your Mac without having to run any sort of "emulator".

I would also recommend to the educator that he or she simply burn the class some Linux "live" CDs to practice with.

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
clive12

 
Member Since: Sep 22, 2010
Location: London
Posts: 197
clive12 is on a distinguished road
Mac Specs: Imac 21.5 Inch 3.06 GHZ 4GB Ram 500 Gig HD, Ipad 32 GB, Iphone 4S 16 GB.

clive12 is offline
Quote:
Originally Posted by cwa107 View Post
That's pretty funny.

So, a batch file is just a series of DOS commands structured in such a way as to perform a series of actions.
Correct.

A Bat file may be used by an IT department to connect to a series of drives for users on the network.

Granted the users could do this themselves but the bat file automates it and is pushed out to all users on the network.

This may be done to ensure the correct drives are loaded and to compensate for users who may be unaware of how to do this.
QUOTE Thanks
cwa107

 
cwa107's Avatar
 
Member Since: Dec 20, 2006
Location: Middletown, Pennsylvania
Posts: 26,439
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
Quote:
Originally Posted by clive12 View Post
Correct.

A Bat file may be used by an IT department to connect to a series of drives for users on the network.

Granted the users could do this themselves but the bat file automates it and is pushed out to all users on the network.

This may be done to ensure the correct drives are loaded and to compensate for users who may be unaware of how to do this.
There's lots of uses for a batch file, mapping drives being one of them. I wasn't really asking a question here, more like explaining what a .bat file does and why it's sort of silly that one would be used for the purposes of emulating Linux.

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
clive12

 
Member Since: Sep 22, 2010
Location: London
Posts: 197
clive12 is on a distinguished road
Mac Specs: Imac 21.5 Inch 3.06 GHZ 4GB Ram 500 Gig HD, Ipad 32 GB, Iphone 4S 16 GB.

clive12 is offline
Quote:
Originally Posted by cwa107 View Post
There's lots of uses for a batch file, mapping drives being one of them. I wasn't really asking a question here, more like explaining what a .bat file does and why it's sort of silly that one would be used for the purposes of emulating Linux.
Sorry my mistake.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Ottawa
Posts: 17,149
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Depending on the requirements, you would probably be better off using a Linux VM to do this. The set of available commands in OS X and more importantly, the filesystem layout, are different enough such that you may notice inconsistencies. While 90% of what you do will be the same across platforms, you're probably better off taking the time to create a Linux VM and use that.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Mac-Forums Investigates MacKeeper - Confused about MacKeeper? Take a look at this review.
QUOTE Thanks

Post Reply New Thread Subscribe


« tired of pc so switching to mac! | Exiting Full Screen »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 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
Mac OS X can not save files larger than 4GB (Torrent Save)!! black knight OS X - Operating System 5 08-13-2010 06:58 AM
help me convert something, please. krrose27 Switcher Hangout 4 05-25-2007 02:10 AM

All times are GMT -4. The time now is 06:44 PM.

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?