@ Ian. Thanks, I understand what you're saying, and I was able to run it with os.path.join() as such:
file = os.path.join(Workspace, "{}".format("MXDS.txt"))
print file
txtFile = open(file, "w")
txtFile.write("The folling list is the file path(s) to the MXD(s) followed by the ArcMap version" + "\n")
txtFile.write("-------------------------------------------------------------------" + "\n")
And the script ran fine and saved the text file as "MXDS", as the string has it doing. But now I realize I wasn't really asking for the correct procedure. What I really want it to do is save as the workspace folder name. So, when the user is running the script tool the folder being saved to will be what the text file is named.
I tried a couple things such as:
file = os.path.dirname(Workspace)
print file
txtFile = open(file, "w")
txtFile.write("The folling list is the file path(s) to the MXD(s) followed by the ArcMap version" + "\n")
txtFile.write("-------------------------------------------------------------------" + "\n")
and got the following error (line 21 in error is line 4 above):
Tried this:
txtFile = open(Workspace, "w")
txtFile.write("The folling list is the file path(s) to the MXD(s) followed by the ArcMap version" + "\n")
txtFile.write("-------------------------------------------------------------------" + "\n")
and got the same error.
Any ideas?