Hi,
I'm trying to open several old documents and save them with the current version.
The script works but I had to press "Yes" for every document.
You can see an illustration of the problem here:
https://www.dropbox.com/s/6ijne28u5unlgej/c4d114_press_yes_python.png?dl=0
Is there a way around this?
Thank you for looking at the problem
You can see the script below
import c4d
import os
def main():
for subdir, dirs, files in os.walk('D:\modifyMe'):
for file in files:
filepath = os.path.join(subdir, file)
flags = c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS
doc = c4d.documents.LoadDocument(filepath, flags)
c4d.documents.InsertBaseDocument(doc)
c4d.documents.SetActiveDocument(doc)
c4d.CallCommand(12098, 12098) # Save
c4d.documents.CloseAllDocuments()
c4d.EventAdd()
if __name__=='__main__':
main()