Last active
December 9, 2015 11:37
-
-
Save AndrewHazelden/13e988c70340acd96696 to your computer and use it in GitHub Desktop.
Use Python to separate a filepath into the base directory, the file, and the filename without an extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
mxsFilePath = 'C:/Program Files/Next Limit/Maxwell 3/scripts/stereo/CubeX.mxs' | |
# Find out the current scene file | |
dirName = os.path.dirname(mxsFilePath) | |
sceneName = os.path.basename(mxsFilePath) | |
scenePathNoExt = os.path.splitext(mxsFilePath)[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment