title: Batch convert Maya files
body: <p>I'm actually working on a script to convert a very basic Maya <code>.ma</code> scene to Nuke <code>.nk</code> project using Maya batch mode (mayapy.exe)</p>
  
  <p>I have found how to select, search infos from camera but I don't know how to export them in a text file, as a text file with <code>.nk</code> extention works in Nuke.
  For the moment I use this to export the camera as FBX :</p>
  
  <pre><code>outputFilename = os.path.splitext(current)[0]+'.fbx'
      print "Output file: ", outputFilename
  
  cmds.file(outputFilename, exportSelected=True, typ="FBX export", force=True, options="v=0;", es=1)
  </code></pre>
  
  <p>But that cant work for text file or <code>.nk</code> file as Maya doesn't have this option in export settings.
  Any idea how I can specify to write in a text file with the <code>.nk</code> extention ? </p>
  
  <p>Thank you.</p>