Saturday, May 3, 2008

WebDAV, Finder, and Terminal

NOTE: If the portion of an image that is displayed gets the point across for you, then that's great.  If something seems missing, then it's getting truncated by the browser against our wishes - click it to view.

Question:  How do I get Explorer View working on a Mac?

Answer: Mount the Document Library in finder over WebDAV.  Downloads and deletions will function fine, but uploads need to be done via cp or curl from a command prompt.

If that made sense to you, then read no further.  If you have no idea what I'm talking about but would still like to get multiple files at once from sharepoint to your mac (or if you need to upload large files and it keeps timing out on you), then read on for a detailed walkthrough.

STEP 1

Navigate to your library in Safari, and copy the URL of the actual library to your clipboard.  My example is on a machine called spbase.

Photobucket

STEP 2

Go back to Finder, and Connect to the Server.

Connect to Server in Finder

Connect to Server 2

STEP 3

Ignore the domain field, as for some reason I can't make it work correctly (I blame either Apple or Microsoft on this one, not sure who screwed it up), and specify your domain and username on the next line as follows.  Give your password as well.

WebDAV Prompt

STEP 4

The Library should open in Finder as shown below.  If you try to drag and drop (finder copy) a file out of it it will work correctly.  It will also allow you to delete things that you have checked out.  What will not work (as is also shown in the picture below) is a copy TO the location.  It is likely a character set issue.


Finder Broken Copy to

STEP 5

If you want to copy a file TO the library from your macintosh, open up Terminal and navigate to where the library was mounted on your file system.  Mine was called Docs, so it was found under /Volumes/Docs.  The first image illustrates that you can drag a file to the Terminal window and the path will be inserted for you at the prompt.  The second shows the full syntax and results for a cp copy as well as one using curl.

Copy with CP
Copy with Curl

Notes: The error after running the cp command is irrelevant, as losing the extended attributes will mean nothing to Windows users that you were collaborating with.  Curl will show you progress, and also has the ability to pick up where a "download" left off.  In our case we're using it for an upload, but trickery is part of the game when you're trying to get Apples to play nicely with Windows.

Check back here for updated information or utilities to make this sort of thing even easier.