list all data sources used in MXD or batch of MXDs in a text file

Discussion created by mpearson29 on Apr 13, 2012
Latest reply on Mar 24, 2014 by hazelton_glenn
I've been attempting to use a python script to list all data sources used in an mxd (need it for entire lists of mxd's really).  The trouble is I don't program or know python.   Is there a more direct way to do this - say a tool in ArcToolbox I don't know about? 

Here's what i've done so far.  I used the script found here:

I created a new toolbox in ArcToolbox and added a script.  Set the source to the script on my c drive.  created 2 parameters named folderPath and output (type folder and textfile).  I created a text file for the output in the same folder where my mxds are.

When I run the script it allows me to choose the folder and text file input parameters, but it crashes and I get the following message:
<type 'exceptions.IndentationError'>: expected an indented block (, line 16)
Failed to execute (MXDlist).

Can anyone help me get this to work this afternoon?  I have attached the script.