diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py index 1fa9bf0..b74e12e 100644 --- a/IPython/nbconvert/writers/files.py +++ b/IPython/nbconvert/writers/files.py @@ -67,6 +67,9 @@ class FilesWriter(WriterBase): #Determine where to write the file to dest = os.path.join(self.build_directory, filename) + path = os.path.dirname(dest) + if not os.path.isdir(path): + os.makedirs(path) #Write file with io.open(dest, 'wb') as f: