Skip to content

Instantly share code, notes, and snippets.

@AndrewHazelden
Last active December 9, 2015 11:36
Show Gist options
  • Save AndrewHazelden/5ca1ad2a3ed6fac37292 to your computer and use it in GitHub Desktop.
Save AndrewHazelden/5ca1ad2a3ed6fac37292 to your computer and use it in GitHub Desktop.
Use Python to check if a file exists on disk
import os
# File to check
mxsFilePath = 'C:/Program Files/Next Limit/Maxwell 3/scripts/stereo/CubeX.mxs'
# See if the file exists
if os.path.exists(mxsFilePath):
print('[MXS File] ' + mxsFilePath)
else:
print('[MXS File Not Found] ' + mxsFilePath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment