How to save copy of MXD to wrong path?

How to save copy of MXD to wrong path?

ArcPy saveACopy method saving copy of MXD to wrong path? I have a script that looks through datasets in a geodatabase and copies a mxd document to a folder. The programs works, however it is saving the map documents to my desktop and not the specified folder on my desktop (PATH2). This is the code I have so far:

Can a saveas be performed on ArcMap script?

In the ArcMap application, if you perform a SaveAs to a new file location, all subsequent changes are directed to the new file. This is not possible within the scripting environment, and therefore, a saveAs method is not provided.

Why are some layers in ArcPy password protected?

Arcpy.mapping export, save, and printing functions will generate the expected updated results without using these functions. Some layers within a map document or layer file may be password protected because the user and password information is not saved within the layer file or map document.

Why is Python unable to overwrite MXD file?

Maybe you open the mxd file in arcmap and this file marked as open file and python can’t overwrite the file. i think your error is IOError: MapDocObject: Unable to save. Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document

What should my path look like in ArcPy?

Your path should look like this, using arcpy.mapping.MapDocument and surround your path with double quotes and double up your back slash: Add double quotes and change out backslash to forward slash: If you only have one map document open you can define current map as:

How to add shapefile to a new MXD?

I assume you’re wanting to add a shapefile to an new mxd. First you need to create a blank mxd by opening ArcMap and Save As to create a blank mxd. Then make a feature layer of your shapefile and then add it to the mxd. For starters, you are going to need to save your shapefile to an .MXD.