Help! I'd like to write a simple script.

Discussion in 'Mac Basics and Help' started by yetieater, Aug 29, 2007.

  1. yetieater macrumors regular

    Joined:
    May 6, 2007
    Location:
    USA
    #1
    I was finally able to get NTFS-3G and MacFuse working on my MacBook Pro. Now, I'd like to write a simple script so that I don't have to keep going to Terminal to mount the drive. Could someone help walk me through this first script? I have Quicksilver, but I don't understand how I should go about using it. Here's what I want to get done:

    mkdir /Volumes/ntfs
    ntfs-3g /dev/disk1s1 /Volumes/ntfs -ovolname="WD Passport"


    Pointers would be appreciated!
     
  2. ab2650 macrumors 6502a

    Joined:
    Jun 21, 2007
    #3
    I say use Automator. Create a new workflow, add "Automator > Run Shell Script". Then type your two lines from above. Save it as an app to your desktop and presto!
     
  3. yetieater thread starter macrumors regular

    Joined:
    May 6, 2007
    Location:
    USA
    #4
    I gave your suggestion a shot, ab2650, but I couldn't get it to work properly. The script kept failing and it produced a folder called ovolname="WD Passport" in my root, a folder called "ntfs" in /Volumes/, and a folder called "ntfs ntfs-3g" in /Volumes/. Any idea what's up?
     
  4. ab2650 macrumors 6502a

    Joined:
    Jun 21, 2007
    #6
    Hmmm... Maybe try creatng a two-step automator action, one for each command? My only rational guess is automator is seeing your command as multiple parameters, like "mkdir test1 test2 test3" will make three directories.

    I have some questions, not being familiar with NTFS-3G and MacFuse... (I actually don't have any NTFS drives around anymore.)
    1) Is it necessary to create /Volumes/ntfs each boot? Does OS X rewrite the /Volumes/ directory at startup? I'm not really sure how OS X stores mountpoints (it's not /etc/fstab)
    2) I suppose that ntfs-3g is a binary (or script) that mounts your volume. However, I'm only familiar with "mount -t" and declaring the FS type; HFS, NFS, SMB, etc. Since you're using a 3rd party binary, are you entirely sure it's in your path? How about you give the script the /full/path/to/ntfs-3g to launch it?

    I'm sorry I don't have more information on mounting NTFS volumes (especially writable NTFS).
     

Share This Page