How can you add several shapefiles to a blank .mxd using a script written with Arcpy? I've started with the code below. The code runs with no errors but the shapefile is not added to the blank .mxd. I'm not sure if you have to first convert the shapefiles to .lyr files? I am trying to run the script outside of ArcMap in command line window.
<SPAN class="kwd" style="color: #00008b;">import</SPAN><SPAN class="pln" style="color: black;"> arcpy<BR /></SPAN><SPAN class="kwd" style="color: #00008b;">from</SPAN><SPAN class="pln" style="color: black;"> arcpy </SPAN><SPAN class="kwd" style="color: #00008b;">import</SPAN><SPAN class="pln" style="color: black;"> env<BR /><BR /></SPAN><SPAN class="com" style="color: gray;"># get the map document</SPAN><SPAN class="pln" style="color: black;"><BR />mxd </SPAN><SPAN class="pun" style="color: black;">=</SPAN><SPAN class="pln" style="color: black;"> arcpy</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="pln" style="color: black;">mapping</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="typ" style="color: #2b91af;">MapDocument</SPAN><SPAN class="pun" style="color: black;">(</SPAN><SPAN class="str" style="color: maroon;">"CURRENT"</SPAN><SPAN class="pun" style="color: black;">)</SPAN><SPAN class="pln" style="color: black;"><BR /><BR /></SPAN><SPAN class="com" style="color: gray;"># get the data frame</SPAN><SPAN class="pln" style="color: black;"><BR />df </SPAN><SPAN class="pun" style="color: black;">=</SPAN><SPAN class="pln" style="color: black;"> arcpy</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="pln" style="color: black;">mapping</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="typ" style="color: #2b91af;">ListDataFrames</SPAN><SPAN class="pun" style="color: black;">(</SPAN><SPAN class="pln" style="color: black;">mxd</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="str" style="color: maroon;">"*"</SPAN><SPAN class="pun" style="color: black;">)[</SPAN><SPAN class="lit" style="color: maroon;">0</SPAN><SPAN class="pun" style="color: black;">]</SPAN><SPAN class="pln" style="color: black;"><BR /><BR /></SPAN><SPAN class="com" style="color: gray;"># create a new layer</SPAN><SPAN class="pln" style="color: black;"><BR />newlayer </SPAN><SPAN class="pun" style="color: black;">=</SPAN><SPAN class="pln" style="color: black;"> arcpy</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="pln" style="color: black;">mapping</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="typ" style="color: #2b91af;">Layer</SPAN><SPAN class="pun" style="color: black;">(</SPAN><SPAN class="pln" style="color: black;">path_to_shapefile_or_feature_class</SPAN><SPAN class="pun" style="color: black;">)</SPAN><SPAN class="pln" style="color: black;"><BR /><BR /></SPAN><SPAN class="com" style="color: gray;"># add the layer to the map at the bottom of the TOC in data frame 0</SPAN><SPAN class="pln" style="color: black;"><BR />arcpy</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="pln" style="color: black;">mapping</SPAN><SPAN class="pun" style="color: black;">.</SPAN><SPAN class="typ" style="color: #2b91af;">AddLayer</SPAN><SPAN class="pun" style="color: black;">(</SPAN><SPAN class="pln" style="color: black;">df</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="pln" style="color: black;"> newlayer</SPAN><SPAN class="pun" style="color: black;">,</SPAN><SPAN class="str" style="color: maroon;">"BOTTOM"</SPAN><SPAN class="pun" style="color: black;">)</SPAN>