Results 1 to 11 of 11
  1. #1


    Member Since
    Jul 20, 2011
    Posts
    42
    Can you run .bat files on a mac?
    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?

  2. #2

    louishen's Avatar
    Member Since
    Oct 22, 2007
    Location
    London
    Posts
    8,968
    Specs:
    Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
    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

  3. #3


    Member Since
    Jul 20, 2011
    Posts
    42
    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!

  4. #4

    louishen's Avatar
    Member Since
    Oct 22, 2007
    Location
    London
    Posts
    8,968
    Specs:
    Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
    You want to run linux on a mac then?
    Member of the Month September 2008 & August 2012 | Found advice useful? use the rep system

  5. #5


    Member Since
    Jul 20, 2011
    Posts
    42
    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.

  6. #6

    louishen's Avatar
    Member Since
    Oct 22, 2007
    Location
    London
    Posts
    8,968
    Specs:
    Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
    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

  7. #7

    cwa107's Avatar
    Member Since
    Dec 20, 2006
    Location
    Lake Mary, Florida
    Posts
    26,947
    Specs:
    15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD
    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!

    https://youtu.be/KHZ8ek-6ccc

  8. #8


    Member Since
    Sep 22, 2010
    Location
    London
    Posts
    197
    Specs:
    Imac 21.5 Inch 3.06 GHZ 4GB Ram 500 Gig HD, Ipad 32 GB, Iphone 4S 16 GB.
    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.

  9. #9

    cwa107's Avatar
    Member Since
    Dec 20, 2006
    Location
    Lake Mary, Florida
    Posts
    26,947
    Specs:
    15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD
    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!

    https://youtu.be/KHZ8ek-6ccc

  10. #10


    Member Since
    Sep 22, 2010
    Location
    London
    Posts
    197
    Specs:
    Imac 21.5 Inch 3.06 GHZ 4GB Ram 500 Gig HD, Ipad 32 GB, Iphone 4S 16 GB.
    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.

  11. #11

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Opening .bat files
    By Arkad in forum OS X - Operating System
    Replies: 2
    Last Post: 11-01-2012, 09:29 AM
  2. Opening .bat files
    By Beatles Fan in forum OS X - Operating System
    Replies: 13
    Last Post: 07-08-2010, 07:51 AM
  3. windows .bat to run java and start mysql
    By motivation in forum Switcher Hangout
    Replies: 2
    Last Post: 04-03-2008, 09:57 AM
  4. how to run hd dvd files on a mac
    By bladde in forum Movies and Video
    Replies: 2
    Last Post: 01-04-2008, 03:59 PM
  5. .bat files help
    By louiscy1 in forum OS X - Development and Darwin
    Replies: 12
    Last Post: 10-18-2007, 08:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •